Pair trading and multicurrency arbitrage. The showdown. - page 96

 
Maxim Kuznetsov #:

it's a sleepover, but without the windows.

What does "without windows" mean? I.e. there is no fixed reference point and it is the highest bar in the history?
With windows - is it when the calculation is made for the last day (more precisely 24 hours) for example? And in this case the window is floating, i.e. with the passage of time
the reference point is moved so that the daily interval of the window is preserved?
Do I understand correctly?

 
mytarmailS #:

Please describe in detail, the formula or a piece of code, because it's not clear, it's hard for me to understand other people's ideas.


I did it my way, through normalisation (standardisation) it turned out to be crap, only 4 lines of code in fact


I've attached the file, but I'm not sure it will open, but try it.

but you don't need to fatalise anything :-)

here it is.

My normalisation, or rather the usual standardisation (x - mean(x)) / sd(x ), which I apply to the first 100 candlesticks and then extend the chart according to the obtained parameters.

is completely unnecessary.

just ln(x) :-)

 
Grigori.S.B #:

What does "without windows" mean? I.e. there is no fixed reference point and it is the highest bar in the history?
With windows - is it when the calculation is for the last day (more precisely 24 hours) for example? And in this case the window is floating, i.e. with the passage of time
the reference point is moved so that the daily interval of the window is preserved?
Do I understand correctly?

The graph shows how, by what ways currencies came to the present moment. Or to the moment selected in history (and what happened to them afterwards).

In the selected reference point they are all equal (equated). The base currency is the same, the measured value is the same (%, yield), from the point of view of mathematics and physics we have the right to such an operation ....

 
Maxim Kuznetsov #:

and you don't have to fatalise anything :-)

this

My normalisation, or rather the usual standardisation (x - mean(x)) / sd(x ) which I apply to the first 100 candlesticks then I extend the chart according to the obtained parameters.

is completely redundant.

just ln(x) :-)

ln(x)

what is x ?

brevity is not the sister of talent )



if we apply log(x) where x is the price, then

 
The main rule of trading: set short stops and let profits grow. If this can be realised in pair trading, it is worth doing it, if not, it is not worth it
 
mytarmailS #:

ln(x)

what is x ?

brevity is not the sister of talent )



if we apply log(x) where x is the price, then

as a result we can see how they changed before and after the selected moment.

PS/ only must be initially converted to USDxxx - dollar first (common base), then it will be correct.

 
Maxim Kuznetsov #:

PS/ only must be initially converted to USDxxx - dollar first (common base), then it will be correct

converted

#  меняю "EURUSD" на "USDEUR" итд пары..
for(i in grep("USD$", names(p)))   p[[i]] <- 1 / p[[i]]

just the names are old, but the numbers are correct

 
Maxim Kuznetsov #:

as a result we can see how they changed before and after the selected moment.

please show me the code

 
mytarmailS #:

given

just the names are old, but the numbers are correct.

Another purely technological moment - the number of bars in different quotes is different. (weekends, downtime on the stock exchange, just "went somewhere").

missing bars should be filled with previous values.

 
Maxim Kuznetsov #:

Another purely technological moment - the number of bars in different quotes is different. (weekends, downtime on the exchange, just "went somewhere")

missing bars should be filled with previous values.

I already have everything equalised at the stage of data creation, everything is clear there.