Ejemplo n.º 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();
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 6
0
 public void SetBaseAlloc(IAlloc allocBase)
 {
     this._allocBase = allocBase;
 }
Ejemplo n.º 7
0
 public void Build()
 {
     this._allocBase = new StaticAlloc();
     IAdjustment adj = new DummyAdjustment();
     AddAdjustment(adj, "Base");
 }
Ejemplo n.º 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();
        }