BUG: Ensure compounded_log_returns set on first dt.
ENH: Add downsampling to BatchTransform.

So that with minute data, 2.5 orders of magnitude of data can
be cut, allowing for longer window_lenghts, when the daily
values are what are desired for a signal.
TST: Add logging of sim params for perf tracker tests.

These tests use the random simulation parameters, which is leading
to an intermittent failure.

We may want to consider removing the randomness, but in the meantime
the randomness is exposing a case where the cost basis is not the value
expected, so logging the sim parameter values to help track down what
parameters cause the failure.
MAINT: Use enviroment normalize_date instead of dt.replace

Continue path of removing scattered calls to dt.replace.
BUG: Mask of batch_transform columns to match keys in data parameter.

The underlying RollingPanel in batch_transform was always accumulating
all values to ever appear in data.

However, at any given algo time the desired return value is what the
current active sids are.

Instead, mask down to the sids that are passed in as the data parameter.
MAINT: Ensure that test sources only provide market days.

Instead of using all calendar days between start and end in test
sources, use the trading calendar for test sources.

Needed for an incoming refactoring of market open and close,
where the opens and closes are indexed by market days.
MAINT: Store values for market open and close in environment.

Instead of creating the market open and close mid-simulation,
calculate upfront the values for market open and close in a
DataFrame, so that they values can be looked up by date, as
viewed as series while investigating data issues.

One downside of this implementation is that the entire history
has open and close values calculated, even though the simulation
may only be a subset of the trade data on record.
Should consider moving the `times` property and other methods
that care about the start and end date of a simulation to
SimulationParameters or another like object.
BUG: Group and aggregate downsampling by trading day.

Otherwise, out of market events would result in a mishaped
panel.
Revert "MAINT: Store values for market open and close in environment."

This reverts commit 17b8980fb9dedf1818d6ad27e9b3c3f4b45853ea.

Backing out rigidness of market and close, while sorting out how
to handle events that are not on a day in the trading calendar.
BUG: Fix non-trading advancement of trading day count and downsample.

Add a guard so that we do not advance trading day count or downsample
on non-trading days.
MAINT: Use Series throughout for daily returns.

Remove the lists of DailyReturn objects in favor of using pd.Series
to store the return values.

Should make it easier to inspect the values when stepping through,
make the windowing of data to a certain range more facile by using,
and have some performance increases due to removing object creation
and member access.
BUG: Fix mismatch of stored benchmark timestamps.

Normalize the date, so that there is not an EST/EDT and UTC mismatch.
BUG: Fix excessive recalcuations in batch.

Downsampled batch transforms should only recalcuate on close
TST: Parameterize stop order test.

So that we can more clearly demarcate each case of buy/sell and
price compared to stop, and their expected outputs.

Also, add comment about the current behavior versus the behavior
that will be moved to in an upcoming fix.
BUG: Fix handling of STOP, LIMIT and STOP LIMIT Orders

Includes specific handling of Buy Stop, Sell Stop, Buy Limit, Sell
Limit, Buy Stop Limit and Sell Stop Limit orders.
TST: Updates tests to fit fixed stop behavior.

Change the answers to the stop order tests to match the corrected
behavior, where results are opposite from previous behavior.
MAINT: Use bitwise flags to help order cases easier to follow.

Instead of nesting order direction and related stop and limit logic,
derive a bitwise mask from the combination of order configurations
and use the mask as a 'switch'.
Merge fix for stop orders.

Pull in patch that fixes the stop orders so they behave correctly
with regard to the price being greater or less than the stop for both
buys and sells.

Also, update unit test and add a refactoring on top of the fix to
make each sell/buy, stop and limit combination more clear.
BUG: Fix naive timestamps in benchmarks.

Always convert the benchmarks to UTC, not just on reload.
ENH: Allow market data loader to be specified to create_simulation_parameters