Skip to content

Commit

Permalink
Merge pull request #1469 from yutiansut/master
Browse files Browse the repository at this point in the history
update to 1.9.6 and fix bug
  • Loading branch information
yutiansut authored Feb 23, 2020
2 parents 73fab53 + 91bd625 commit 7d2e98b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
28 changes: 14 additions & 14 deletions QUANTAXIS/QAData/QADataStruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ def to_qfq(self):
data = self.data.join(adj)
for col in ['open', 'high', 'low', 'close']:
data[col] = data[col] * data['adj']
data['volume'] = data['volume'] / \
data['adj'] if 'volume' in data.columns else data['vol']/data['adj']
try:
data['high_limit'] = data['high_limit'] * data['adj']
data['low_limit'] = data['high_limit'] * data['adj']
except:
pass
data['volume'] = data['volume'] / \
data['adj'] if 'volume' in data.columns else data['vol']/data['adj']
try:
data['high_limit'] = data['high_limit'] * data['adj']
data['low_limit'] = data['high_limit'] * data['adj']
except:
pass
return self.new(data, self.type, 'qfq')
except Exception as e:
print(e)
Expand Down Expand Up @@ -284,13 +284,13 @@ def to_qfq(self):

for col in ['open', 'high', 'low', 'close']:
data[col] = data[col] * data['adj']
data['volume'] = data['volume'] / \
data['adj']
try:
data['high_limit'] = data['high_limit'] * data['adj']
data['low_limit'] = data['high_limit'] * data['adj']
except:
pass
data['volume'] = data['volume'] / \
data['adj']
try:
data['high_limit'] = data['high_limit'] * data['adj']
data['low_limit'] = data['high_limit'] * data['adj']
except:
pass
return self.new(data, self.type, 'qfq')
except Exception as e:
print(e)
Expand Down
2 changes: 1 addition & 1 deletion QUANTAXIS/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
2017/4/8
"""

__version__ = '1.9.5'
__version__ = '1.9.6'
__author__ = 'yutiansut'

import argparse
Expand Down

0 comments on commit 7d2e98b

Please sign in to comment.