-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sum_signed_rolling_deltas function and proper NumPy vectorization. Some TMO indicators in TV consider the rolling window to be exclusive of the current day, while others consider it inclusive. Since this series is used to compute the moving averages and momentums for the TMO, there would be a plot mismatch against TV unless we dealt with both cases. Added doctests for both cases, noting that since the series must be cast to float type, fp precision representation issues might arise, which makes the Pandas Series equality tests unsuitable. We use np.allclose so that we can deal with both the fp precision issues if they arise, and with the necessary NaN padding as well.
- Loading branch information
1 parent
affcac4
commit 0749177
Showing
1 changed file
with
105 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters