Class VaRBase
An abstract base class for providing portfolio Value-at-Risk calculations.
public abstract class VaRBase
- Inheritance
-
VaRBase
- Derived
- Inherited Members
- Extension Methods
Properties
BaseCurrency
Gets/sets the base currency.
public string BaseCurrency { get; set; }
Property Value
CurrentDate
The last date used in the VaR calculations.
public DateTime CurrentDate { get; set; }
Property Value
FXSeries
Gets/sets a BarSeriesCollection that will be used as the primary source of historical fx pricing information. If a series isn't found here, the FxServer will be queried.
public BarSeriesCollection FXSeries { get; set; }
Property Value
FXServer
Gets/sets the BarServer be used to retrieve historical FX pricing. Not required if all symbols are in the base currency.
public IBarServer FXServer { get; set; }
Property Value
Instruments
Gets/sets an InstrumentCollection that can be used to provide point value and currency information to the calculation engine.
public InstrumentCollection Instruments { get; set; }
Property Value
LookBack
Gets/sets the number of bars used in the VaR calculations.
public int LookBack { get; set; }
Property Value
PriceSeries
Gets/sets a BarSeriesCollection that will be used as the primary source of historical pricing information. If a series isn't found here, the PriceServer will be queried.
public BarSeriesCollection PriceSeries { get; set; }
Property Value
PriceServer
Gets/sets the price server used to provide historical pricing.
public IBarServer PriceServer { get; set; }
Property Value
Significance
Gets/sets the significance level (e.g. 99% = 0.99).
public double Significance { get; set; }
Property Value
Methods
Calculate(IEnumerable<IPortfolioHolding>)
Returns the Value-at-Risk for the specified positions.
public double Calculate(IEnumerable<IPortfolioHolding> positions)
Parameters
positions
IEnumerable<IPortfolioHolding>
Returns
Calculate(IEnumerable<Position>)
Returns the Value-at-Risk for the specified positions.
public double Calculate(IEnumerable<Position> positions)
Parameters
positions
IEnumerable<Position>
Returns
OnCalculate(IEnumerable<IPortfolioHolding>, List<DateTime>)
The method where the VaR calculation should be implemented.
protected abstract double OnCalculate(IEnumerable<IPortfolioHolding> positions, List<DateTime> dates)
Parameters
positions
IEnumerable<IPortfolioHolding>dates
List<DateTime>
Returns
OnMessage(MessageEventArgs)
Raises a message event.
protected virtual void OnMessage(MessageEventArgs e)
Parameters
Events
Message
Sends a message
public event EventHandler<MessageEventArgs> Message