Hello from quarantined London.
I'm reasonably new to algotrading, so please excuse me if my question seems basic or obvious.
I am exploring the idea of trading multiple pairs. My entry/exit signals will be based on a function involving two currency pairs - for example BTCETH and BTCXRP, specifically something like this: https://blog.quantinsti.com/pairs-trading-basics/.
I see the
candles returns an array of numpy array, and I can use
get_candles to access another route's candles too. My question is, can I combine those series together to make a new series based on a function? I'd probably want to zip the two, and then map them to form a single sequence (there's probably a functional way to do that without two operations but it slips my mind).
Example (pseudo code):
new_candles = (btc_eth_candles - btc_xrp_candles) * (btc_eth_candles / btc_xrp_candles)
// then I can use new_candles.close in my should_long functions etc
1) Is transforming two sequences together to form a single sequence even possible in Jesse?
2) Will this be too computationally expensive to do at run-time? Would a better solution be to cache the combination sequence in the DB alongside it's components?