Class PortfolioSupport.Covariance
Class encapsulating calculation of covariance matrix.
Inherited Members
Namespace: TuringTrader.Support
Assembly: TuringTrader.Simulator.dll
Syntax
public class PortfolioSupport.Covariance
Constructors
| Edit this page View SourceCovariance(IEnumerable<Instrument>, int, int)
Create new covariance object. Subsample the instrument bars, to create bars with a larger size, if desired. https://en.wikipedia.org/wiki/Covariance
Declaration
public Covariance(IEnumerable<Instrument> universe, int numBars, int barSize = 1)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<Instrument> | universe | universe of instruments |
| int | numBars | of bars to calculate |
| int | barSize | of bars between points, default = 1 |
Covariance(IEnumerable<Instrument>, int, int, Func<Instrument, ITimeSeries<double>>)
Create new covariance object. Subsample the instrument bars, to create bars with a larger size, if desired. https://en.wikipedia.org/wiki/Covariance
Declaration
public Covariance(IEnumerable<Instrument> universe, int numBars, int barSize, Func<Instrument, ITimeSeries<double>> priceFunc)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<Instrument> | universe | universe of instruments |
| int | numBars | of bars to calculate |
| int | barSize | of bars between points, default = 1 |
| Func<Instrument, ITimeSeries<double>> | priceFunc | predicate |
Properties
| Edit this page View SourceBarSize
Size of bars, as the number of bars from the instruments being subsampled, in order to calculate co-variance. Default is 1.
Declaration
public int BarSize { get; }
Property Value
| Type | Description |
|---|---|
| int |
this[Instrument, Instrument]
Retrieve covariance.
Declaration
public double this[Instrument instrument1, Instrument instrument2] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| Instrument | instrument1 | instrument #1 |
| Instrument | instrument2 | instrument #2 |
Property Value
| Type | Description |
|---|---|
| double | covariance |
NumBars
Number of bars used to calculate covariance
Declaration
public int NumBars { get; }
Property Value
| Type | Description |
|---|---|
| int |