mhallsmoore / qsforex

QuantStart Forex Backtesting and Live Trading
http://www.quantstart.com
779 stars 354 forks source link

Portfolio.side works with buy&sell, Position.side with LONG & SHORT #2

Closed Wesseldr closed 9 years ago

Wesseldr commented 9 years ago

The portfolio class works with the variable 'side' with possible values: 'buy' and 'sell' where the position class except it to be LONG or SHORT (line 21 position.py)

mhallsmoore commented 9 years ago

Hi Wessel,

I've actually modified this now by completely replacing how the Portfolio and Position handling is carried out. The Position class does a lot more of the "heavy lifting", which stops overridden Portfolio classes from having to do too much "boilerplate".

There is still more to do, however, but it certainly fixes this particular issue!

Mike.

Wesseldr commented 9 years ago

thank you!