How to backtest my trading strategy ?

2 visualizaciones (últimos 30 días)
Rizwan Khan
Rizwan Khan el 17 de Sept. de 2020
Respondida: Puru Kathuria el 8 de Mzo. de 2021
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

Respuestas (1)

Puru Kathuria
Puru Kathuria el 8 de Mzo. de 2021
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.
Also, have a look at this interesting thread, which talks about a simple backtest strategy.

Categorías

Más información sobre Transaction Cost Analysis en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by