Hi everyone,
thought i'd start a journal of my semiautomated strategy. so why should it be interesting to journal something that is (more or less) automated? i'll come to that.
maybe first a little bit about myself. i am a 27 year old phd student from germany and have been trading for about 3 years. i have not traded the whole 3 years, more like 1 1/2 of it, with the last 12 months being the main period of my trading experience. like most here i am also a student of ict, although i think i am not as closely following him as the majority on here. but this kind of manual trading will not be part of this thread, at least not directly.
so a few words about the strategy:
during the last two months or so i've developed a quantitative strategy. it is based on the concept of "cointegration". it basically just means, that if two pairs (or more commonly two stocks) are cointegrated, then the spread (difference) between the price movements of those two is mean reverting. a simplified example of how to trade this could be if you found two cointegrated pairs (statistical evalutation using a CADFtest for example) and the spread has widened to a certain amount, then you could "short" the spread. this is done by going long the one pairs and shorting the other pairs in a certain ratio. a typical target would be the closing of the spread, so a spread of 0.
anyhow, dont want to go into much detail about this. but based on this concept i've developed a strategy that trades 13 pairs (the main ones). i download daily data once a day (duh), and let matlab do its calculations. then once a day i update my portfolio positions (given matlab tells me to change something).
i've backtested this strategy over the past 12 years and the BACKTEST! results look quite promising. why do i emphasize the word "backtest", well just because it worked in the past doesnt mean it will in the future. what gives me hope though is that 12 years of daily data is quite a lot and also we've had some turbulent times in those years that this strategy survived.
also i have been forwardtesting (livetesting) it for about 6 weeks now and the results are even above the historical average (currently up 24% with 7.4% max drawdown). only time will tell if i really found something of value.
sooo, after all that, why this thread? isnt it boring to just talk about positions matlab spits out? well, i modified the execution of this strategy, which makes it only semiautomated. i give myself the right to scale in and out of the positions that the computer tells me to take. so far i have scaled out to 0.8 exposure and scaled in up to 1.5 times of the original positions. now you can ask, but how could you possibly determine when to scale in and out with a portfolio of 13 different pairs? first i can and will only change the exposure if at least 70% of the whole portfolio positions can be explained by a maximum of 2 pairs. for this i aggregate each currency (not pair) and match the ones with the biggest position value, giving me one or two currency pairs. now this is where the "indirect" part of ict trading and the whole reason for this thread comes in. i look at the charts of those one or two pairs and try to determine good times to increase or decrease my overall portfolio position.
what i love about this method is that i have my "bias" given to me by the numbers but at the same time i can use my understanding of the market. also i cant get kicked out by short term fluctuations hitting my SL. forgot to mention: i dont use a fixed set stop loss for my positions with this strategy. i know, i know, you will say this is bad. but with pairs trading you have a more or less hedged position (it should be like that, that's the whole point). i am not saying that there is no risk or not even small risk with this method. it is very risky! BUT: over the past 12 years this strategy had a maximum drawdown of 46% and never came close to a margin call. also i am not using no SL at all. within the calculations of my positions i have set a stop loss for the spread. this means if the spread blows up and it becomes less likely the pairs are any longer cointegrated i will get out of that position, at the end of the day when the new calculations are done! so i have more or less a daily SL, not an intraday one.
in this thread i will post if/when i have one or two pairs that make for at least 70% of my overall portfolio and then if/when i am increasing/decreasing my exposure. i will try to post a chart every now and then.
to start things off: attached you find the backtest performance chart. 1000euro starting capital and no increase in positions (which should normally be done with growing capital). with proportional increase in positions the charts will look like crap because the scaling is so bad that you cant see the first half of the period (only as a flat line), thus this chart. what you can also see is that there is a period of about 1 1/2 years near the end with a pretty much flat equity curve, just some sideways action. i hope we dont get a period like that again, but at least it is just flat and not downward sloping
currently i have 2 pairs that make more than 70% of my portfolio, namely USDJPY long and EURCHF long. my current scaling factor is 1.15, so i am at some moderate increased risk at the moment. will scale back a bit before tomorrow LO, since USDJPY did quite a good job and is at marked resistance. would then scale back in on a retracement to 100.50ish. EURCHF is currently at strong support, but i am not too sure about that one and also the UJ position is a bit bigger than the EURCHF position, so scaling out is my preferred strategy at the moment.
that's it from me for now, if you have suggestions or questions, feel free
cheers,
stefan
thought i'd start a journal of my semiautomated strategy. so why should it be interesting to journal something that is (more or less) automated? i'll come to that.
maybe first a little bit about myself. i am a 27 year old phd student from germany and have been trading for about 3 years. i have not traded the whole 3 years, more like 1 1/2 of it, with the last 12 months being the main period of my trading experience. like most here i am also a student of ict, although i think i am not as closely following him as the majority on here. but this kind of manual trading will not be part of this thread, at least not directly.
so a few words about the strategy:
during the last two months or so i've developed a quantitative strategy. it is based on the concept of "cointegration". it basically just means, that if two pairs (or more commonly two stocks) are cointegrated, then the spread (difference) between the price movements of those two is mean reverting. a simplified example of how to trade this could be if you found two cointegrated pairs (statistical evalutation using a CADFtest for example) and the spread has widened to a certain amount, then you could "short" the spread. this is done by going long the one pairs and shorting the other pairs in a certain ratio. a typical target would be the closing of the spread, so a spread of 0.
anyhow, dont want to go into much detail about this. but based on this concept i've developed a strategy that trades 13 pairs (the main ones). i download daily data once a day (duh), and let matlab do its calculations. then once a day i update my portfolio positions (given matlab tells me to change something).
i've backtested this strategy over the past 12 years and the BACKTEST! results look quite promising. why do i emphasize the word "backtest", well just because it worked in the past doesnt mean it will in the future. what gives me hope though is that 12 years of daily data is quite a lot and also we've had some turbulent times in those years that this strategy survived.
also i have been forwardtesting (livetesting) it for about 6 weeks now and the results are even above the historical average (currently up 24% with 7.4% max drawdown). only time will tell if i really found something of value.
sooo, after all that, why this thread? isnt it boring to just talk about positions matlab spits out? well, i modified the execution of this strategy, which makes it only semiautomated. i give myself the right to scale in and out of the positions that the computer tells me to take. so far i have scaled out to 0.8 exposure and scaled in up to 1.5 times of the original positions. now you can ask, but how could you possibly determine when to scale in and out with a portfolio of 13 different pairs? first i can and will only change the exposure if at least 70% of the whole portfolio positions can be explained by a maximum of 2 pairs. for this i aggregate each currency (not pair) and match the ones with the biggest position value, giving me one or two currency pairs. now this is where the "indirect" part of ict trading and the whole reason for this thread comes in. i look at the charts of those one or two pairs and try to determine good times to increase or decrease my overall portfolio position.
what i love about this method is that i have my "bias" given to me by the numbers but at the same time i can use my understanding of the market. also i cant get kicked out by short term fluctuations hitting my SL. forgot to mention: i dont use a fixed set stop loss for my positions with this strategy. i know, i know, you will say this is bad. but with pairs trading you have a more or less hedged position (it should be like that, that's the whole point). i am not saying that there is no risk or not even small risk with this method. it is very risky! BUT: over the past 12 years this strategy had a maximum drawdown of 46% and never came close to a margin call. also i am not using no SL at all. within the calculations of my positions i have set a stop loss for the spread. this means if the spread blows up and it becomes less likely the pairs are any longer cointegrated i will get out of that position, at the end of the day when the new calculations are done! so i have more or less a daily SL, not an intraday one.
in this thread i will post if/when i have one or two pairs that make for at least 70% of my overall portfolio and then if/when i am increasing/decreasing my exposure. i will try to post a chart every now and then.
to start things off: attached you find the backtest performance chart. 1000euro starting capital and no increase in positions (which should normally be done with growing capital). with proportional increase in positions the charts will look like crap because the scaling is so bad that you cant see the first half of the period (only as a flat line), thus this chart. what you can also see is that there is a period of about 1 1/2 years near the end with a pretty much flat equity curve, just some sideways action. i hope we dont get a period like that again, but at least it is just flat and not downward sloping
currently i have 2 pairs that make more than 70% of my portfolio, namely USDJPY long and EURCHF long. my current scaling factor is 1.15, so i am at some moderate increased risk at the moment. will scale back a bit before tomorrow LO, since USDJPY did quite a good job and is at marked resistance. would then scale back in on a retracement to 100.50ish. EURCHF is currently at strong support, but i am not too sure about that one and also the UJ position is a bit bigger than the EURCHF position, so scaling out is my preferred strategy at the moment.
that's it from me for now, if you have suggestions or questions, feel free
cheers,
stefan
Attachments

10.9 KB Views: 671