Пример #1
0
 public DefaultStrategy(String strategyName, SimInputData input)
 {
     this.StrategyName = strategyName;
     this.Input = input;
     this._allocBase = new StaticAlloc();
     this._opSet = new OperationSet();
     this._adjustment = new DummyAdjustment();
 }
Пример #2
0
        public OptiTester(IAlloc alloc, IAdj adj, double startKospiWeight, double endKospiWeight, int testCount)
        {
            this.StartKospiWeight = startKospiWeight;
            this.EndKospiWeight = endKospiWeight;
            this.TestCount = testCount;
            this.Alloc = alloc;
            this.Adj = adj;

            Trace.Assert(TestCount != 0);
        }
Пример #3
0
        public AssetRateCalculator(IAlloc alloc, List<IAdj> adjs, SimInputData inputData, MixupRule rule)
        {
            Trace.Assert(alloc != null);
            Trace.Assert(adjs != null);
            Trace.Assert(inputData != null);

            this.Alloc = alloc;
            this.Adjs = adjs;
            this.InputData = inputData;
            this.Rule = rule;
        }
        public void Build()
        {
            this._allocBase = new StaticAlloc();
            this._opSet = new OperationSet();

            int key = 0;

            this._adjustment = new DummyAdjustment();

            AddAdjustment_Static(key++, this._adjustment);
            AddAdjustment_WithMA(key++, this._adjustment, 1);
        }
Пример #5
0
        public SimCase(String name, IAlloc alloc, List<IAdj> adjs, SimInputData inputData, MixupRule rule, MarketDataSet marketData)
        {
            Trace.Assert(name != null);
            Trace.Assert(alloc != null);
            Trace.Assert(adjs != null);
            Trace.Assert(inputData != null);
            Trace.Assert(marketData != null);

            this.Name = name;
            this.Alloc = alloc;
            this.Adjs = adjs;
            this.InputData = inputData;
            this.Rule = rule;
            this.Calculator = new AssetRateCalculator(alloc, adjs, inputData, rule);
            this.MarketData = marketData;
        }
Пример #6
0
 public void SetBaseAlloc(IAlloc allocBase)
 {
     this._allocBase = allocBase;
 }
Пример #7
0
 public void Build()
 {
     this._allocBase = new StaticAlloc();
     IAdjustment adj = new DummyAdjustment();
     AddAdjustment(adj, "Base");
 }
Пример #8
0
        public static String GetSimCaseKey(IAlloc alloc, List<IAdj> adjs)
        {
            StringBuilder sb = new StringBuilder();
            sb.Append(alloc.GetKey());
            sb.Append(";[");

            foreach (IAdj adj in adjs)
            {
                sb.Append(adj.GetKey().Trim());
                sb.Append(", ");
            }
            sb.Append("]");
            return sb.ToString();
        }