#include <assert.h>
#include <stdlib.h>
#include <math.h>
#include "wu.h"
Go to the source code of this file.
◆ NUM_INPUTS
◆ NUM_OUTPUTS
◆ pairs_trading_strat_free()
| void pairs_trading_strat_free |
( |
struct WU_Strategy_ * | strategy | ) |
|
|
static |
◆ pairs_trading_strat_update()
◆ wu_pairs_trading_strat_new()
| WU_PairsTradingStrat wu_pairs_trading_strat_new |
( |
int | window, |
|
|
double | threshold, |
|
|
double | ratio ) |
Creates a new pairs trading strategy.
- Parameters
-
| window | Lookback period for spread statistics |
| threshold | Number of standard deviations for entry (e.g., 2.0) |
| ratio | Hedge ratio between assets |
- Returns
- New pairs trading strategy instance
Definition at line 106 of file pairs_trading.c.
◆ input_types
Initial value: = {
}
@ WU_DATA_TYPE_SINGLE_VALUE
Definition at line 9 of file pairs_trading.c.
◆ signal_buffer