kernc / kernc/backtesting.py

Dynamic leverage / ability to adjust margin while backtest is running

Open
#712 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
9k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

I want to request the ability to adjust the margin while backtesting.

**Why is this important?**
When implementing a strategy, there are periods where we want to have less or more leverage based on some market fundamentals. This will enable a better backtest where we can be more aggressive in bullish periods and conservative in bearish periods.

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Start by locating the backtesting engine and strategy execution path, then determine how margin and leverage are represented during a run. Done means a strategy can adjust margin while backtesting and the resulting position sizing and performance reflect those changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
fintech-quant
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.