Efficient Stop Loss calculations? (Finance)

2 views (last 30 days)
Hi,
I'm new to Matlab, but have been an amateur in the quantitative trading system development scene for a while. For my University dissertation I'm testing a variety of trading rules using Matlab.
Speed/efficiency is very important.
I want to incorporate a Stop-loss and Take-profit in my strategy whereby trades are closed when price reaches a certain distance away from the trade opening price.
Trades are stored in a vector whereby 1 is a long position and -1 is a short position. My data is 2 year tick data, that has been converted into time periods (e.g. 15min) to give Open, High, Low, Close (OHLC) values and trading decisions are based one these.
Ideally I want to calculate stop-loss/take-profit exits using tick data to be more accurate, however if the most efficient way involves looping through 2 years of tick data then this might not be feasible.
Does anyone know an efficient way to do this?
Thanks,
Chris

Answers (0)

Community Treasure Hunt

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

Start Hunting!