MiniXC / simple-back

A simple daily python backtester that works out of the box.
Mozilla Public License 2.0
59 stars 12 forks source link

inconsistent use of nshares and num_shares #21

Closed R-K-H closed 4 years ago

R-K-H commented 4 years ago

https://github.com/MiniXC/simple-back/blob/master/simple_back/backtester.py#L1312 https://github.com/MiniXC/simple-back/blob/master/simple_back/backtester.py#L137

So a position has num_shares but when opening a position you have nshares

I fought with this last night for quite a while just based on expectation that it would have been consistent across the implementation, not sure if this is by design or just different period of development, but it would seem they should be one in the same?

Just a small nag, and open for discussion.

MiniXC commented 4 years ago

This is not by design but results from an evolving code base. Easy to fix though, so expect it to be gone soon.

MiniXC commented 4 years ago

fixed in 2dc28d7c17a0d2de5d5739a16b9dede7e42d5858, thanks for reporting