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개)
Puru Kathuria
2021년 3월 8일
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.
댓글 수: 0
참고 항목
카테고리
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!