StatArb signal and strategy performance analysis

Now, let's analyze the StatArb signal using the following steps:

  1. Let's visualize a few more details about the signals in this trading strategy, starting with the correlations between CAD/USD and the other currency pairs as it evolves over time:
# Plot correlations between TRADING_INSTRUMENT and other currency pairscorrelation_data = pd.DataFrame()for symbol in SYMBOLS:  if symbol == TRADING_INSTRUMENT:    continue  correlation_label = TRADING_INSTRUMENT + '<-' + symbol  correlation_data = correlation_data.assign(label=pd.Series(correlation_history[correlation_label], index=symbols_data[symbol].index)) ax = correlation_data['label'].plot(color=next(cycol), lw=2., label='Correlation ' + correlation_label) ...

Get Learn Algorithmic Trading now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.