Show / Hide Table of Contents

Class PortfolioSupport.Covariance

Class encapsulating calculation of covariance matrix.

Inheritance
object
PortfolioSupport.Covariance
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: TuringTrader.Support
Assembly: TuringTrader.Simulator.dll
Syntax
public class PortfolioSupport.Covariance

Constructors

| Edit this page View Source

Covariance(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

| Edit this page View Source

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 Source

BarSize

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
| Edit this page View Source

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

| Edit this page View Source

NumBars

Number of bars used to calculate covariance

Declaration
public int NumBars { get; }
Property Value
Type Description
int
  • Edit this page
  • View Source
In this article
Back to top Copyright © 2011-2023, Bertram Enterprises LLC dba TuringTrader.com