public WholeViewModel() { generateHistory = new BackTestGenerateHistoryVM(); pricingViewModel = new VanillaCallPricingVM(); Facade facade = new Facade(generateHistory.GenerateHistory, pricingViewModel.Pricing); viewFacade = new ViewFacade(facade); }
/** * 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; }
/** * 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; }
/** * 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; }
/** * * 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);