public void Setup() { this._logger = A.Fake <ILogger>(); this._exchangeTickInitialiser = A.Fake <IExchangeSeriesInitialiser>(); this._strategy = A.Fake <IEquityDataGeneratorStrategy>(); this._heartbeat = new Heartbeat(TimeSpan.FromMilliseconds(500)); }
public EquitiesDataGenerationMarkovProcess( IEquityDataGeneratorStrategy dataStrategy, IReadOnlyCollection <DataGenerationPlan> plan, TimeSpan tickSeparation, ILogger logger) { this._dataStrategy = dataStrategy ?? throw new ArgumentNullException(nameof(dataStrategy)); this._tickSeparation = tickSeparation; this._plan = plan ?? new List <DataGenerationPlan>(); this._logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public EquitiesMarkovProcess( IExchangeSeriesInitialiser exchangeTickInitialiser, IEquityDataGeneratorStrategy dataStrategy, IHeartbeat heartbeat, ILogger logger) { this._exchangeTickInitialiser = exchangeTickInitialiser ?? throw new ArgumentNullException(nameof(exchangeTickInitialiser)); this._dataStrategy = dataStrategy ?? throw new ArgumentNullException(nameof(dataStrategy)); this._heartBeat = heartbeat ?? throw new ArgumentNullException(nameof(heartbeat)); this._logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
private void Tick(DateTime advanceTick, IEquityDataGeneratorStrategy strategy) { lock (this._walkingLock) { var tockedSecurities = this._activeFrame.Securities .Select(sec => strategy.AdvanceFrame(sec, advanceTick, false)).ToArray(); var tickTock = new EquityIntraDayTimeBarCollection( this._activeFrame.Exchange, advanceTick, tockedSecurities); this._activeFrame = tickTock; this._stream.Add(tickTock); } }
public PlanEquityStrategy(DataGenerationPlan plan, IEquityDataGeneratorStrategy baseStrategy) { this._plan = plan ?? throw new ArgumentNullException(nameof(plan)); this._baseStrategy = baseStrategy ?? throw new ArgumentNullException(nameof(baseStrategy)); }