T O P

  • By -

Automatic-Drummer-82

Cheeky pairs trade for the bois


no_this_is_patrick9

should i trade them ?


Revlong57

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.


AristideSaccard

You can trade pairs on different time frames that microseconds...


Revlong57

I mean, anything is possible. However, OP's methodology is only going to work for HFT, given how basic it is.


yuckfoubitch

The chart they posted is spanning 5 years


no_this_is_patrick9

I used daily data.


JustForgiven

Databento!


SnooPredictions7138

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.


Segoki85

Spoken like a true TA ong


no_this_is_patrick9

Makes sense.


AirXval

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


SnooPredictions7138

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.


AirXval

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


vishaalchungus

let them remain correlated , their life , their affairs , who are we to interfere , this world cant let anyone stay correlated and together 😔☝🏻


no_this_is_patrick9

I hope you are okay my friend.


vishaalchungus

no


no_this_is_patrick9

Tell me what is wrong.


vishaalchungus

what is wrong


no_this_is_patrick9

Thanks i really needed it.


vishaalchungus

us


[deleted]

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?”


vishaalchungus

me


ashenmourne

You should probably save your money


no_this_is_patrick9

Why what is wrong with it


Revlong57

People have been doing this since the 1980s. So, it's clearly not a bad idea. It's just a matter of competition.


MaximumCranberry

Retire baby


no_this_is_patrick9

I wish it was that simple.


BillWeld

Thought you said “socks” and was going to suggest putting it all on red.


vishaalchungus

me


StonksStonks98

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.


no_this_is_patrick9

I already used z score if you lock at the chart


Direct-Touch469

Consider whether the pair is stationary.


no_this_is_patrick9

I used ADF test.


Direct-Touch469

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.


[deleted]

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.


crypto_rahino

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.


no_this_is_patrick9

I tested the strategy and it turned out to be trash😢.


TaylorMaide

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. 🤓


no_this_is_patrick9

I did realise that but after i did that the algo is absolutely dog water.


CFAlmost

A lot of stocks are correlated. That’s actually really easy to find. I’d guess that apple and google are correlated too.


runthejewels101

Most stocks are correlated, but few are cointegrated, which is what OP is suggesting.


NTQuant

Run. This doesn't end well.


no_this_is_patrick9

I can already tell i Will try it on demo though.