Have a look at the documentation of backtestStrategy which will help you in creating a backtestStrategy object where you can define your portfolio allocation strategy.
How to backtest my trading strategy ?
2 次查看(过去 30 天)
显示 更早的评论
I have a strategy that buys/sells based on a criteria. I would like to back test it, to understand how good/bad it works.
How can i program matlab to back test and record the results?
Please view the two charts below to understand the strategy.
Basically when the detrended data chart reached to the level of -125 (bottom red line) then buy the stock, and when it reaches to a level of +125 (top red line) sell it.
Stock data chart
Detrended data chart
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Transaction Cost Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!