Class CompositeInstrumentComponent
- Namespace
- NanoQL.Instruments
- Assembly
- NanoQL.dll
A component of a CompositeInstrument: an instrument, the engine that prices it and its multiplier,
QuantLib's std::pair<ext::shared_ptr<Instrument>, Real> with the engine the instrument carries.
public sealed class CompositeInstrumentComponent
- Inheritance
-
CompositeInstrumentComponent
- Inherited Members
Remarks
Immutable. The engine is a delegate, as nanoql's instruments carry none.
Constructors
CompositeInstrumentComponent(Instrument, Func<EvaluationContext, InstrumentResults>, double)
Initializes a new instance of the CompositeInstrumentComponent class.
public CompositeInstrumentComponent(Instrument instrument, Func<EvaluationContext, InstrumentResults> engine, double multiplier)
Parameters
instrumentInstrumentThe instrument.
engineFunc<EvaluationContext, InstrumentResults>The engine pricing it, from the evaluation context.
multiplierdoubleThe multiplier of its value.
Exceptions
- ArgumentNullException
instrumentorengineis null.
Properties
Engine
Gets the engine pricing the instrument.
public Func<EvaluationContext, InstrumentResults> Engine { get; }
Property Value
Instrument
Gets the instrument.
public Instrument Instrument { get; }
Property Value
Multiplier
Gets the multiplier of the instrument's value.
public double Multiplier { get; }