Short sell with backtest Engine
古いコメントを表示
What's the most effecient way to implement short selling strategies with the backtestEngine?
Using this Matlab example as a reference: https://www.mathworks.com/help/finance/backtest-investment-strategies-with-trading-signals.html
It appears that if you change crossoverRebalanceFcn to output negative portfolio weights, for example
change
new_weights(idx) = availableCapital / uninvestedAssets;
to
new_weights(idx) = -availableCapital / uninvestedAssets;
That seems to work. Is that the correct way to implement a short? Any other considerations with this approach or is there a better approach?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Portfolio Optimization and Asset Allocation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!