public ModelPerformance(IPortfolioModel model, decimal iboxxtarget, decimal msciworldtarget, decimal compositetarget, decimal benchmarkperformance, int quarter, int yyyy) { this.IBoxxTarget = iboxxtarget; this.MSCIWorldTarget = msciworldtarget; this.CompositeTarget = compositetarget; this.BenchMarkValue = benchmarkperformance; this.Quarter = quarter; this.PerformanceYear = yyyy; this.ModelPortfolio = model; }
/// <summary> /// Initializes a new instance of the <see cref="T:B4F.TotalGiro.Accounts.CustomerAccount">CustomerAccount</see> class. /// </summary> /// <param name="number">The Account's number</param> /// <param name="shortName">Shortname of the account</param> /// <param name="accountOwner">The owner of the account</param> /// <param name="modelPortfolio">The model portfolio the account is tied to</param> public CustomerAccount(string number, string shortName, IManagementCompany accountOwner, IPortfolioModel modelPortfolio, DateTime creationDate) : base(number, shortName, accountOwner, modelPortfolio) { this.CreationDate = creationDate; this.Status = AccountStati.Active; this.LastDateStatusChanged = creationDate; this.TradeableStatus = Tradeability.NonTradeable; this.UseManagementFee = true; this.DateTradeabilityStatusChanged = creationDate; }
public FinancialDataView(IPortfolioModel model, bool allowMissingExpectedReturn) { if (model == null) throw new ArgumentNullException("model."); this.model = model; AllowMissingExpectedReturn = allowMissingExpectedReturn; RetrieveModelData(); }
internal LifecycleLine(ILifecycle parent, int ageFrom, IPortfolioModel model) { if (ageFrom == 0) throw new ApplicationException("Age From is mandatory"); if (model == null) throw new ApplicationException("Model is mandatory"); Parent = parent; AgeFrom = ageFrom; Model = model; CreatedBy = B4F.TotalGiro.Security.SecurityManager.CurrentUser; }
public ModelHistory(IAccountTypeCustomer account, ILifecycle lifecycle, IPortfolioModel model, bool isExecOnlyCustomer, AccountEmployerRelationship employerRelationship, IInternalEmployeeLogin employee, DateTime changeDate) { Account = account; Lifecycle = lifecycle; ModelPortfolio = model; IsExecOnlyCustomer = isExecOnlyCustomer; EmployerRelationship = employerRelationship; Employee = employee; ChangeDate = changeDate.Date; }
public FinancialDataView(ICustomerAccount account, bool allowMissingExpectedReturn, bool initializeAccountData) { if (account == null) throw new ArgumentNullException("account."); this.account = account; this.model = Account.ModelPortfolio; AllowMissingExpectedReturn = allowMissingExpectedReturn; if (initializeAccountData) { RetrieveFinancialTargetData(); RetrievePositionData(); if (account.ModelPortfolio == null) throw new ArgumentException("Account does not have a Model Portfolio."); RetrieveModelData(); } }
public RebalanceExcludedModel(IPortfolioModel model) { if (model == null) throw new ApplicationException("The model can not be null"); this.Model = model; }
/// <summary> /// The method to alter the Model portfolio /// </summary> /// <param name="lifecycle">The current lifecycle</param> /// <param name="newModelPortfolio">The new model portfolio</param> /// <param name="isExecOnlyCustomer">Is this an execution only customer</param> /// <param name="employerRelationship">The relationship that the account has to the company</param> /// <param name="employee">The employee who performs the change</param> /// <param name="changeDate">The date of the change</param> /// <returns></returns> public bool SetModelPortfolio(ILifecycle lifecycle, IPortfolioModel newModelPortfolio, bool isExecOnlyCustomer, AccountEmployerRelationship employerRelationship, IInternalEmployeeLogin employee, DateTime changeDate) { ModelPortfolioChanges.Add(new ModelHistory.ModelHistory(this, lifecycle, newModelPortfolio, isExecOnlyCustomer, employerRelationship, employee, changeDate)); IsExecOnlyCustomer = isExecOnlyCustomer; if (this.AccountType == AccountTypes.Customer) ((ICustomerAccount)this).EmployerRelationship = employerRelationship; ModelPortfolio = newModelPortfolio; if (CurrentManagementFeePeriod == null && Util.IsNotNullDate(FirstManagementStartDate) && Util.IsNullDate(FinalManagementEndDate)) createManagementFeePeriod(changeDate); return true; }
/// <summary> /// The method to alter the Model portfolio /// </summary> /// <param name="newModelPortfolio">The new model portfolio</param> /// <param name="isExecOnlyCustomer">Is this an execution only customer</param> /// <param name="employerRelationship">The relationship that the account has to the company</param> /// <param name="employee">The employee who performs the change</param> /// <returns>true when successfull</returns> public bool SetModelPortfolio(IPortfolioModel newModelPortfolio, IInternalEmployeeLogin employee, DateTime changeDate) { AccountEmployerRelationship employerRelationship = AccountEmployerRelationship.None; if (this.AccountType == AccountTypes.Customer) employerRelationship = ((ICustomerAccount)this).EmployerRelationship; if (Util.IsNullDate(changeDate)) changeDate = DateTime.Now; return SetModelPortfolio(Lifecycle, newModelPortfolio, this.IsExecOnlyCustomer, employerRelationship, employee, changeDate); }
/// <summary> /// Initializes a new instance of the <see cref="T:B4F.TotalGiro.Accounts.AccountTypeCustomer">AccountTypeCustomer</see> class. /// </summary> /// <param name="number">The Account's number</param> /// <param name="shortName">Shortname of the account</param> /// <param name="accountOwner">The owner of the account</param> /// <param name="modelPortfolio">The model portfolio the account is tied to</param> public AccountTypeCustomer(string number, string shortName, IManagementCompany accountOwner, IPortfolioModel modelPortfolio) : base(number, shortName, accountOwner) { this.ModelPortfolio = modelPortfolio; }
public bool Edit(IPortfolioModel model, bool isExecOnlyCustomer, AccountEmployerRelationship employerRelationship, IInternalEmployeeLogin employee, DateTime changeDate) { // It is not possible to edit the model, IsExecOnlyCustomer || EmployerRelationship for the latest item if (EndDate == DateTime.MinValue) { if (this.ModelPortfolio != model || this.IsExecOnlyCustomer != isExecOnlyCustomer || this.EmployerRelationship != employerRelationship) throw new ApplicationException("It is not possible to update data on the latest history item. Otherwise the data would no longer be in sync"); if (changeDate != this.ChangeDate && Account != null && Account.ModelPortfolioChanges != null && Account.ModelPortfolioChanges.Count > 0) { int check = (from a in Account.ModelPortfolioChanges where a.Key != this.Key && a.ChangeDate > changeDate select a).Count(); if (check > 0) throw new ApplicationException("It is not possible to change the date of the latest history item to a date prior a previous history items."); } } this.ModelPortfolio = model; this.IsExecOnlyCustomer = isExecOnlyCustomer; this.EmployerRelationship = employerRelationship; this.ChangeDate = changeDate; this.Employee = employee; return true; }