Closed pennymax closed 11 months ago
Hi @pennymax,
The enable_fractional_shares
option allows fractional shares to be used when placing orders. The calc_target_shares
function is a utility function for computing shares, it does not have any effect on the order logic. But I can update the function to take into consideration the enable_fractional_shares
config option.
Hi, @edtechre,
I appreciate your detailed explanation. It'd be beneficial if the "enable_fractional_shares" option could be incorporated into the calc_target_shares function.
Made this change in dev. This will be merged into the v1.1.30 release.
Hi, @edtechre,
I noticed that the "calc_target_shares" function consistently returns an integer value. It seems not to factor in the "enable_fractional_shares" option. Was this intentional? For context, higher-priced cryptocurrencies like BTC permit trading in fractional shares. When backtesting BTC with a limited initial cash amount, I always get a result of 0 shares from "calc_target_shares". While I can create my own function to determine shares, I'm wondering if I've correctly understood the purpose of the "enable_fractional_shares" option.