Skip to content

Commit

Permalink
日期格式处理
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Nov 14, 2018
1 parent 2547794 commit 6cf33df
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions MainEntrance/fundPortfolio.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import pandas as pd
import numpy as np
from datetime import datetime, date
import AssetAllocation.AssetAllocationMain as AssetAllocationMain
from AssetAllocation.AssetAllocationMain import AssetAllocationMain
from fundSelect.SetPortfolio import SetPortfolio
import matplotlib.pylab as plt
Expand All @@ -30,8 +29,6 @@ def __init__(self):
# 获取投资组合调仓期内的权重
def getPortfolioWeightDf(self, IndexWeightDf, dicResult, resultDf):
usefulNetDf = resultDf.dropna(axis=0)
# timeList = [tempTime.strftime('%Y-%m-%d') for tempTime in usefulNetDf.index.tolist()]
# usefulNetDf = pd.DataFrame(usefulNetDf.values, index=timeList, columns=usefulNetDf.columns)
timeList = usefulNetDf.index.tolist()

# 找到第一个持仓日
Expand Down Expand Up @@ -189,6 +186,8 @@ def plotFigureResult(self,nameStr,pofolioAndBench,tempPositionDf,newFold,labels)
plt.savefig(newFold + ('%s.png' % (nameStr)))
plt.show()



def setMain(self,method='risk_parity',productFlag=True,**param):
result = {} # 保留结果
AssetAllocationMainDemo, totalPofolio, IndexWeightDf, nameStr = self.getBigAsset(method=method,param=param)
Expand Down

0 comments on commit 6cf33df

Please sign in to comment.