Class PortfolioSupport.MarkowitzCLA
Class encapsulating Markowitz CLA algorithm to calculate the the efficient frontier.
Inheritance
Inherited Members
Namespace: TuringTrader.Support
Assembly: TuringTrader.Simulator.dll
Syntax
public class PortfolioSupport.MarkowitzCLA
Constructors
| Improve this Doc View SourceMarkowitzCLA(IEnumerable<Instrument>, Func<Instrument, double>, Func<Instrument, Instrument, double>, Func<Instrument, double>, Func<Instrument, double>)
Create new CLA object.
Declaration
public MarkowitzCLA(IEnumerable<Instrument> universe, Func<Instrument, double> meanFunc, Func<Instrument, Instrument, double> covarianceFunc, Func<Instrument, double> lowerBoundFunc, Func<Instrument, double> upperBoundFunc)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T><Instrument> | universe | instrument universe |
System.Func<T, TResult><Instrument, double> | meanFunc | instrument mean vector |
System.Func<T1, T2, TResult><Instrument, Instrument, double> | covarianceFunc | instrument covariance matrix |
System.Func<T, TResult><Instrument, double> | lowerBoundFunc | portfolio lower bound vector |
System.Func<T, TResult><Instrument, double> | upperBoundFunc | portfolio upper bound vector |
Methods
| Improve this Doc View SourceEfficientFrontier(int)
Return efficient frontier, w/ specified # of points
Declaration
public IEnumerable<PortfolioSupport.MarkowitzCLA.Portfolio> EfficientFrontier(int points = 100)
Parameters
Type | Name | Description |
---|---|---|
int | points | number of points |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><PortfolioSupport.MarkowitzCLA.Portfolio> | portfolios at each point |
EvalPositions(double)
Evaluate the current positions.
Declaration
public PortfolioSupport.MarkowitzCLA.Portfolio EvalPositions(double netAssetValue)
Parameters
Type | Name | Description |
---|---|---|
double | netAssetValue | current net asset value |
Returns
Type | Description |
---|---|
PortfolioSupport.MarkowitzCLA.Portfolio | portfolio |
MaximumSharpeRatio()
Return portfolio w/ maximum sharpe ratio.
Declaration
public PortfolioSupport.MarkowitzCLA.Portfolio MaximumSharpeRatio()
Returns
Type | Description |
---|---|
PortfolioSupport.MarkowitzCLA.Portfolio | portfolio |
MinimumVariance()
Return portfolio w/ minimum variance.
Declaration
public PortfolioSupport.MarkowitzCLA.Portfolio MinimumVariance()
Returns
Type | Description |
---|---|
PortfolioSupport.MarkowitzCLA.Portfolio | portfolio |
TargetVolatility(double)
Return portfolio with the specified risk (or less). Note that the weights of this portfolio might not add up to 1.0: This routine will return a portfolio on the capital allocation line, if the target risk is lower than the risk of the portfolio with the maximum Sharpe Ratio.
Declaration
public PortfolioSupport.MarkowitzCLA.Portfolio TargetVolatility(double targetRisk)
Parameters
Type | Name | Description |
---|---|---|
double | targetRisk | risk setting |
Returns
Type | Description |
---|---|
PortfolioSupport.MarkowitzCLA.Portfolio | portfolio |
TurningPoints()
Return all turning points for efficient frontier.
Declaration
public IEnumerable<PortfolioSupport.MarkowitzCLA.Portfolio> TurningPoints()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><PortfolioSupport.MarkowitzCLA.Portfolio> | enumerable of portfolios |