Lean
$LEAN_TAG$
|
This alpha model is designed to accept every possible pair combination from securities selected by the universe selection model This model generates alternating long ratio/short ratio insights emitted as a group More...
Public Member Functions | |
BasePairsTradingAlphaModel (int lookback=1, Resolution resolution=Resolution.Daily, decimal threshold=1m) | |
Initializes a new instance of the BasePairsTradingAlphaModel class More... | |
override IEnumerable< Insight > | Update (QCAlgorithm algorithm, Slice data) |
Updates this alpha model with the latest data from the algorithm. This is called each time the algorithm receives data for subscribed securities More... | |
override void | OnSecuritiesChanged (QCAlgorithm algorithm, SecurityChanges changes) |
Event fired each time the we add/remove securities from the data feed More... | |
virtual bool | HasPassedTest (QCAlgorithm algorithm, Symbol asset1, Symbol asset2) |
Check whether the assets pass a pairs trading test More... | |
Public Member Functions inherited from QuantConnect.Algorithm.Framework.Alphas.AlphaModel | |
AlphaModel () | |
Initialize new AlphaModel More... | |
Properties | |
HashSet< Security > | Securities [get] |
List of security objects present in the universe More... | |
Properties inherited from QuantConnect.Algorithm.Framework.Alphas.AlphaModel | |
virtual string | Name [get, set] |
Defines a name for a framework model More... | |
Properties inherited from QuantConnect.Algorithm.Framework.Alphas.INamedModel | |
string | Name [get] |
Defines a name for a framework model More... | |
This alpha model is designed to accept every possible pair combination from securities selected by the universe selection model This model generates alternating long ratio/short ratio insights emitted as a group
Definition at line 33 of file BasePairsTradingAlphaModel.cs.
QuantConnect.Algorithm.Framework.Alphas.BasePairsTradingAlphaModel.BasePairsTradingAlphaModel | ( | int | lookback = 1 , |
Resolution | resolution = Resolution.Daily , |
||
decimal | threshold = 1m |
||
) |
Initializes a new instance of the BasePairsTradingAlphaModel class
lookback | Lookback period of the analysis |
resolution | Analysis resolution |
threshold | The percent [0, 100] deviation of the ratio from the mean before emitting an insight |
Definition at line 52 of file BasePairsTradingAlphaModel.cs.
|
virtual |
Updates this alpha model with the latest data from the algorithm. This is called each time the algorithm receives data for subscribed securities
algorithm | The algorithm instance |
data | The new data available |
Reimplemented from QuantConnect.Algorithm.Framework.Alphas.AlphaModel.
Definition at line 75 of file BasePairsTradingAlphaModel.cs.
|
virtual |
Event fired each time the we add/remove securities from the data feed
algorithm | The algorithm instance that experienced the change in securities |
changes | The security additions and removals from the algorithm |
Reimplemented from QuantConnect.Algorithm.Framework.Alphas.AlphaModel.
Reimplemented in QuantConnect.Algorithm.Framework.Alphas.PearsonCorrelationPairsTradingAlphaModel.
Definition at line 92 of file BasePairsTradingAlphaModel.cs.
|
virtual |
Check whether the assets pass a pairs trading test
algorithm | The algorithm instance that experienced the change in securities |
asset1 | The first asset's symbol in the pair |
asset2 | The second asset's symbol in the pair |
Reimplemented in QuantConnect.Algorithm.Framework.Alphas.PearsonCorrelationPairsTradingAlphaModel.
|
get |
List of security objects present in the universe
Definition at line 44 of file BasePairsTradingAlphaModel.cs.