Parameter scans provide a convenient way to see the effect of applying a filter such as our borrow fee filter. We run the scan with the MAX_BORROW_FEE
filter set to None
(disabled) and 0.3:
from quantrocket.zipline import scan_parameters
scan_parameters(
"avoid-high-borrow",
start_date="2018-04-16",
end_date="2024-04-30",
capital_base=2e5,
param1="MAX_BORROW_FEE",
vals1=[None, 0.3],
filepath_or_buffer="avoid_high_borrow_MAX_BORROW_FEE_results.csv",
progress="M")
Then view the tear sheet:
from moonchart import ParamscanTearsheet
ParamscanTearsheet.from_csv("avoid_high_borrow_MAX_BORROW_FEE_results.csv")