Ejemplo n.º 1
0
        public WholeViewModel()
        {
            generateHistory  = new BackTestGenerateHistoryVM();
            pricingViewModel = new VanillaCallPricingVM();
            Facade facade = new Facade(generateHistory.GenerateHistory, pricingViewModel.Pricing);

            viewFacade = new ViewFacade(facade);
        }
Ejemplo n.º 2
0
 /**
  * Constructor for a hardcoded Basket Option.
  * */
 public OptionBasket(IPricingViewModel ipricing, String name, DateTime startDate, DateTime maturity, Share[] shares, double strike, double[] weights)
 {
     myPricer    = ipricing;
     oName       = name;
     currentDate = startDate;
     oMaturity   = maturity;
     oShares     = shares;
     oStrike     = strike;
     oWeights    = weights;
 }
Ejemplo n.º 3
0
 /**
  * Constructor for a hardcoded Vanilla Call Option.
  * */
 public OptionVanilla(IPricingViewModel ipricing, String name, DateTime startDate, DateTime maturity, Share[] shares, double strike)
 {
     currentDate = startDate;
     myPricer    = ipricing;
     oName       = name;
     oMaturity   = maturity;
     oShares     = shares;
     oStrike     = strike;
     oWeight     = new double[1];
     oWeight[0]  = 1;
 }
Ejemplo n.º 4
0
        /**
         * see AbstractOptionCombobox.setPricer
         **/
        public override void setPricer(IPricingViewModel myPricingVM, IGenerateHistoryViewModel myGenHistoryVM)
        {
            myPricingVM.Pricing.oMaturity = oMaturity;
            myPricingVM.Pricing.oName     = oName;
            myPricingVM.Pricing.oShares   = oShares;
            myPricingVM.Pricing.oStrike   = oStrike;

            myGenHistoryVM.GenerateHistory.endTime          = oMaturity;
            myGenHistoryVM.GenerateHistory.strike           = oStrike;
            myGenHistoryVM.GenerateHistory.underlyingShares = oShares;
            myGenHistoryVM.GenerateHistory.vanillaCallName  = oName;
            myGenHistoryVM.GenerateHistory.weight           = oWeight;
        }
Ejemplo n.º 5
0
 /**
  *
  *  Method used to inform the pricer and the historical generator
  *  of the specification of the selected Option
  *
  **/
 abstract public void setPricer(IPricingViewModel myPricingVM, IGenerateHistoryViewModel myGenHistoryVM);