You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copula Black-Litterman Model with Machine Learning Derived Views and Uncertainty
Files
run_bt.py : Backtest all stategies.
copML_BL.py : Main framework for calculating weights.
copula_utils.py : Caculate copula covariance matrix, and functions for reading pre-trained data.
ml_utils.py : Machine learning models and feature generation.
optimize.py : Different objective functions for optimizing portfolio.
finance_data_util.py : Tools for fetching financial data and functions for calculating performance of portfolios.
./data : Fundemental and macro datas.
./fit_results : Pre-fit datas for copula and machine learning predictions.
./results : Results for different strategies.
Overview
Enhanced the Black-Litterman model by incorporating vine-copula models for market equilibrium returns and ensemble machine learning for forecasting asset returns. Used ML model errors to quantify view uncertainty, improving portfolio performance and max drawdown in Taiwan’s stock market.
Data
Time Period: 2016.01.01 - 2024.03.01
Stocks: Top 50 market cap stocks in the US and Taiwan stock market.
Rebalance Frequency: 1 month
Data Sorce: Yahoo Finance
Methodology
Black-Litterman model
Black-Litterman model is consist of three parts:
1. Market Equalibrium
2. Personal View
3. Optimization
We use different models in each part of the optimization process to try to enhance the performance.
Vine-Copula Models
Captures the dependencies between stocks more accurately.
We use R package 'VineCopula' to calculate the covariance matrix more efficiently.
To make this process more smoothly, we use 'rpy2' to run R in a python script.
Ensemble Learning Models
Random Forest and XGBoost are used to predict stocks' returns.
Predict with technical analysis indexs and Macro datas.
Optimization Objective Functions
Max Sharpe Ratio
Minimize CVaR
Portfolio Construction
We test different combinations with different models, shown as below: