You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Python implementation of FuturesContract is missing several important parameters that exist in its Rust/PyO3 counterpart. This creates an inconsistency between the two implementations that should be addressed.
Current State:
The Python FuturesContract class does not include the following parameters that are present in the PyO3 version:
margin_init
margin_maint
maker_fee
taker_fee
These parameters are defined and accessible in the PyO3 implementation at nautilus_trader/core/nautilus_pyo3/model/FuturesContract.py, but cannot be set when constructing a FuturesContract using the Python implementation.
Impact:
This inconsistency means that margin and fee information cannot be properly initialized for futures contracts when using the Python implementation, which could affect margin calculations and fee modeling in trading strategies.
Notes from Discord:
Similar discrepancies exist in at least 4 other instrument implementations
This relates to the broader discussion about margin and fee modeling in the system
The text was updated successfully, but these errors were encountered:
stefansimik
changed the title
Add missing margin and fee parameters to Python FuturesContract
FuturesContract - Add missing margin and fee parameters to Python
Dec 14, 2024
Per the Discord discussion, these were left off when we intended to redesign the margin and fee modeling - but for now I agree we should align the Python and Rust implementations, and add these missing params.
The Python implementation of
FuturesContract
is missing several important parameters that exist in its Rust/PyO3 counterpart. This creates an inconsistency between the two implementations that should be addressed.Current State:
The Python
FuturesContract
class does not include the following parameters that are present in the PyO3 version:margin_init
margin_maint
maker_fee
taker_fee
These parameters are defined and accessible in the PyO3 implementation at
nautilus_trader/core/nautilus_pyo3/model/FuturesContract.py
, but cannot be set when constructing a FuturesContract using the Python implementation.Impact:
This inconsistency means that margin and fee information cannot be properly initialized for futures contracts when using the Python implementation, which could affect margin calculations and fee modeling in trading strategies.
Notes from Discord:
The text was updated successfully, but these errors were encountered: