We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07228dd commit a438450Copy full SHA for a438450
taiyangxue/regular_invest/app.py
@@ -92,15 +92,14 @@ def dataStock(html):
92
93
def dataFormat(code, type_='fund', cycleDays=5, begin='2001-01-01'):
94
rawdf = pd.read_excel('%s_%s.xlsx' % (type_, code))
95
- buydf = rawdf[rawdf.index % cycleDays==0] ## 选出定投时机
96
# 选择对应的列
97
if type_ == 'fund':
98
- buydf = buydf[['公布日期','单位净值']]
+ buydf = rawdf[['公布日期','单位净值']]
99
else:
100
buydf = buydf[['日期','收盘价']]
101
buydf.columns = ["日期","单价"]
102
-
103
buydf = buydf[buydf['日期']>=begin]
+ buydf = buydf[buydf.index % cycleDays==0] # 选出定投时机
104
return buydf
105
106
def show(buydf, amount=1000):
0 commit comments