public override Position nextDateClone(DateTime nextDate) { VanillaIRSPosition clone = new VanillaIRSPosition(); this.nextDatepositionBaseCopy(clone, nextDate); return clone; }
public override Position build_position() { VanillaIRSPosition irsP = new VanillaIRSPosition(); irsP.DAO_ = new DatabaseLayer.clsHITM_FP_POSITION_TB(); //irsP.Financial_instrument_ = this.Financial_instrument_; irsP.DAO_.POSITION_ID = IDGenerator.getNewPositionID(this.DAO_.INSTRUMENT_ID,this.DAO_.TRADE_DT); irsP.DAO_.FP_MASTER_TYP = this.DAO_.FP_MASTER_TYP; irsP.DAO_.POSITION_DT = this.DAO_.TRADE_DT; irsP.DAO_.INSTRUMENT_ID = this.DAO_.INSTRUMENT_ID; irsP.DAO_.INSTRUMENT_QNT = this.DAO_.TRADE_QNT; irsP.DAO_.EVAL_CURR = this.DAO_.TRADE_CURR; irsP.DAO_.CURR_RATE = this.DAO_.CURR_RATE; irsP.DAO_.NOTIONAL_AMT = this.DAO_.TRADE_NOTIONAL_AMT; irsP.DAO_.ACCOUNT_AMT = this.DAO_.ACCOUNT_AMT; if (this.DAO_.TRADE_QNT != 0) { irsP.DAO_.ACCOUNT_UNIT = this.DAO_.ACCOUNT_AMT / this.DAO_.TRADE_QNT; } else { irsP.DAO_.ACCOUNT_UNIT = 0.0; } irsP.DAO_.ACCOUNT_INDEX = this.DAO_.TRADE_INDEX; irsP.DAO_.EVAL_AMT = 0.0; irsP.DAO_.EVAL_PRICE = 0.0; irsP.DAO_.EVAL_ACCOUNT_PL = 0.0; irsP.DAO_.TRADE_PROFIT = 0.0; irsP.DAO_.TRADE_LOSS = 0.0; irsP.DAO_.TRADE_TOTAL = this.DAO_.TRADE_PL; irsP.DAO_.TRANSACTION_FEE = this.DAO_.TRADE_FEE; irsP.DAO_.ETC_PL = 0.0; irsP.DAO_.TOTAL_ACCOUNT_PL = 0.0; irsP.DAO_.DAILY_EVAL_PL = 0.0; irsP.DAO_.DAILY_TOTAL_PL = 0.0; return irsP; }