Skip to content

Commit

Permalink
fixed bad indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
Shile Wen committed May 2, 2020
1 parent 9489177 commit 28e0101
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
setup(
name = 'trade_stat_logger',
packages = ['trade_stat_logger'],
version = '0.1.2',
version = '0.1.3',
license='MIT',
description = 'Log trades and analyze performance, risk, and other statistical measures',
long_description = 'View documentation at https://github.com/shilewenuw/trade_stat_logger/blob/master/README.md',
author = 'Shile Wen',
author_email = '[email protected]',
url = 'https://github.com/shilewenuw',
download_url = 'https://github.com/shilewenuw/trade_stat_logger/archive/v_012.tar.gz',
download_url = 'https://github.com/shilewenuw/trade_stat_logger/archive/v_013.tar.gz',
keywords = ['PYTHON', 'STOCKS', 'TRADING', 'BACKTEST', 'STATISTICS'],
install_requires=[
'numpy', 'pandas', 'pytz', 'matplotlib', 'yahoo_fin', 'statsmodels'
Expand Down
4 changes: 2 additions & 2 deletions trade_stat_logger/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ def get_summary_statistics(self):
num_losses = len(df_losses)

# rots stands for (r)eturn (o)n (t)rade (s)ize
df_pos_rots = df[df['return on trade size'] > 0]
df_neg_rots = df[df['return on trade size'] < 0]
# df_pos_rots = df[df['return on trade size'] > 0]
# df_neg_rots = df[df['return on trade size'] < 0]
# avg_pos_rots = df_pos_rots['return on trade size'].mean()
# avg_neg_rots = abs(df_neg_rots['return on trade size'].mean())

Expand Down

0 comments on commit 28e0101

Please sign in to comment.