Commit Graph

8 Commits

Author SHA1 Message Date
Michael Handschuh 86157cd5e7 Manually create US equity security exchange hours
Travis was having issues loading the market-hours-database.json and ended
up constantly using the always open exchange hours.
2018-08-07 15:02:44 -04:00
Michael Handschuh 4fd16f6daf Fix resolution of insight close times, allow user defined close times
Fixes a bug where we were using the security's data resolution to compute
the insight's close time. This led a case such as insight.Period == 20days
to step 20days worth of tradable minutes (assuming minute data resolution),
yielding a close time that was very far in the future.

We also add different means of specifying an insight's period/close time:
1. Specify insight period as a TimeSpan and we compute close time
2. Specify insight period and a resolution and bar count and we compute close time
3. Specify insight close time local directly and we compute the insight period

The key here is maintaining consistency between the three different approaches
which is heavily validated with the corresponding unit tests.

Edits also made to trust the insight's close time as the analysis end time in
the case where the analysis period == insight period (extra analysis period = 0).
Given the current setup (extra analysis period == 0), this guarantees that close
and analysis end times are equivalent.

Regression statistics were updated and expectedly we get many more insights that
have completed analysis, and as such, average scores have also changed.
2018-08-07 11:21:11 -04:00
Michael Handschuh d52ea82573 Adds TimeSpan.Multiply extension method
The alternative is fairly verbose and often obfuscates the intent.
2018-04-03 12:31:01 -04:00
Michael Handschuh 2450f40d37 Improve date time from unix stamp precision
AddSeconds and AddMilliseconds methods are only accurate to the millisecond.
This fix uses the AddTicks methods to get the highest possible precision
2018-03-10 16:38:12 -05:00
Michael Handschuh 5e491744b2 Adds Time.EachTradeableDayInTimeZone 2016-02-12 13:42:55 -05:00
snugs 284b83bfde Remove empty half test
Accidentally commited previously
2015-09-20 22:31:20 -04:00
snugs f30259a08c Properly set algorithm.UtcTime for usage in Initialize 2015-09-20 21:21:50 -04:00
snugs 65f75708bb Initial implementation of IHistoryProvider 2015-09-15 15:40:09 -04:00