コード例 #1
0
        // 항상 같은 ReqPrice를 반환한다.

        public double GetReqPrice(ReqOrderInput_BondArb input)
        {
            // input을 사용하지 않는다. 그냥 정해진 값을 반환한다.
            return input.InitReqPrice;
        }
コード例 #2
0
        void InitSweepMembers()
        {
            //long
            IReqOrderPolicy longReqOrderPolicy = new ReqOrderPolicy_BondArb();
            IResumePolicy longResumePolicy = new StaticWaitingPolicy();
            ReqOrderInput_BondArb longOrderGenInput = new ReqOrderInput_BondArb(
                _input.LongMemberInput.InitPrice,
                _input.LongMemberInput.Code,
                _input.ShortMemberInput.Code,
                _input.LongMemberInput.LongShort,
                _input.LongMemberInput.TradingAccount);
            IBalancePolicy longBalancePolicy = new BalancePolicy_NoAction();

            SweepMember_Input longInput = _input.LongMemberInput;
            _longPart = new SweepMember(
                this, longInput, longOrderGenInput, longReqOrderPolicy, longResumePolicy, longBalancePolicy);

            //short
            IReqOrderPolicy shortReqOrderPolicy = new ReqOrderPolicy_BondArb();
            IResumePolicy shortResumePolicy = new StaticWaitingPolicy();
            ReqOrderInput_BondArb shortOrderGenInput = new ReqOrderInput_BondArb(
                _input.ShortMemberInput.InitPrice,
                _input.ShortMemberInput.Code,
                _input.LongMemberInput.Code,
                _input.ShortMemberInput.LongShort,
                _input.ShortMemberInput.TradingAccount);

            SweepMember_Input shortInput = _input.ShortMemberInput;
            IBalancePolicy shortBalancePolicy = new BalancePolicy_BondArb();
            _shortPart = new SweepMember(
                this, shortInput, shortOrderGenInput, shortReqOrderPolicy, shortResumePolicy, shortBalancePolicy);

            //TODO !!!
            // _longPart와 _shortPart가 서로를 알고 있다가 Balance signal 상황이 되면 알맞게 주문 넣어주기...
        }
コード例 #3
0
 public double GetReqPrice(ReqOrderInput_BondArb input)
 {
     //TODO
     return input.InitReqPrice;
 }