Thousandaire / thousandaire

Hellow python! Hellow rich world!
MIT License
1 stars 3 forks source link

Change the type of pnls form the returns of simulator. #8

Closed ioumu8 closed 4 years ago

ioumu8 commented 4 years ago

In the current pnls returned from simulator and passed to evaluator are the sum of instruments in each day. In the notation now, results.pnl[0] means the total pnl of first simulation day. It would be changed into liked results.pnl[0]['USD'] means the pnl of USD in the first simulation day.
Thus, the line 58 in evaluator.py should be changed. @hcshen916

ioumu8 commented 4 years ago

It may just change line 58 from pnls = np.array([item.pnl for item in data]) to pnls = np.array([sum(item.pnl.values()) for item in data]) @hcshen916