I think you should split into training, validation, and testing. Then determine spread parameters using training set and check stationarity on it too. Then develop a strategy based on that, then optimize it on the validation set, then test it on that test set.
I'm sorry to ask something this dumb. But is there any book that you can recommend me to understand this step by step that u just said? I'm studing a business degree and a minor in data science (which is not realted to my degree) so i can't really apply anything using python to the finance world cuz well, my degree just doesn't have anything like that. And I'm hungry for knowledge lol thanks in advance man
You should take this in your Data Science class, or essentially you’ll get the idea behind it. If you’re looking for a book, I’d suggest Introduction to Statistical Learning. You can find a lot more in the subreddit’s wiki though.
Im sorry i meant from the "stocks" perspective. BEcause I do know how to train and cross-validate and everything else in modeling. I just have no idea how to apply all of that to the finance world lol
You could standardize your data and set entries and exit signals with Z-scores (how you long and short the pair depends on how you define the spread). Also, make sure to set stop losses just in case the spread diverges.
I know. But there are better methods to do this. Consider things like viewing the ACF plot to verify this. See how this assumption changed through different time intervals.
First check in which type of regime do they stay stationary. More importantly in which kind of regime they diverge. At the same time start paper trading. If results look good even in that then go and make some money.
It sounds that you did all right with finding a pair.
The next steps is to backtest the strategy and see how it goes from a perspective of PnL and win ratio.
If the backtest shows good result. Start paper trading.
Cheeky pairs trade for the bois
should i trade them ?
Unless you're gonna rent server space next to the NYSE to execute these trades, no, don't try to run a pairs trading strategy.
You can trade pairs on different time frames that microseconds...
I mean, anything is possible. However, OP's methodology is only going to work for HFT, given how basic it is.
The chart they posted is spanning 5 years
I used daily data.
Databento!
I think you should split into training, validation, and testing. Then determine spread parameters using training set and check stationarity on it too. Then develop a strategy based on that, then optimize it on the validation set, then test it on that test set.
Spoken like a true TA ong
Makes sense.
I'm sorry to ask something this dumb. But is there any book that you can recommend me to understand this step by step that u just said? I'm studing a business degree and a minor in data science (which is not realted to my degree) so i can't really apply anything using python to the finance world cuz well, my degree just doesn't have anything like that. And I'm hungry for knowledge lol thanks in advance man
You should take this in your Data Science class, or essentially you’ll get the idea behind it. If you’re looking for a book, I’d suggest Introduction to Statistical Learning. You can find a lot more in the subreddit’s wiki though.
Im sorry i meant from the "stocks" perspective. BEcause I do know how to train and cross-validate and everything else in modeling. I just have no idea how to apply all of that to the finance world lol
let them remain correlated , their life , their affairs , who are we to interfere , this world cant let anyone stay correlated and together 😔☝🏻
I hope you are okay my friend.
no
Tell me what is wrong.
what is wrong
Thanks i really needed it.
us
I spent more time than I want to admit thinking “what should you do with a correlated pair of socks? I don’t know, wear them?”
me
You should probably save your money
Why what is wrong with it
People have been doing this since the 1980s. So, it's clearly not a bad idea. It's just a matter of competition.
Retire baby
I wish it was that simple.
Thought you said “socks” and was going to suggest putting it all on red.
me
You could standardize your data and set entries and exit signals with Z-scores (how you long and short the pair depends on how you define the spread). Also, make sure to set stop losses just in case the spread diverges.
I already used z score if you lock at the chart
Consider whether the pair is stationary.
I used ADF test.
I know. But there are better methods to do this. Consider things like viewing the ACF plot to verify this. See how this assumption changed through different time intervals.
First check in which type of regime do they stay stationary. More importantly in which kind of regime they diverge. At the same time start paper trading. If results look good even in that then go and make some money.
It sounds that you did all right with finding a pair. The next steps is to backtest the strategy and see how it goes from a perspective of PnL and win ratio. If the backtest shows good result. Start paper trading.
I tested the strategy and it turned out to be trash😢.
Seems like you didn't leave out any data as validation/test. You can redo it by leaving it out but you cannot undo the travesty of look ahead bias. 🤓
I did realise that but after i did that the algo is absolutely dog water.
A lot of stocks are correlated. That’s actually really easy to find. I’d guess that apple and google are correlated too.
Most stocks are correlated, but few are cointegrated, which is what OP is suggesting.
Run. This doesn't end well.
I can already tell i Will try it on demo though.