mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-06 03:27:44 +00:00
refactor: remove all proprietary terms from codebase and git history
- Rename FTMO_* constants → generic names (RISK_PER_TRADE, MAX_DAILY_LOSS, etc.) - Rename backtest_signal_ftmo → backtest_signal_risk - Rename _apply_ftmo_mask → _apply_risk_mask - Clean all FTMO/riskMgmt mentions from commit messages via filter-branch - AGENTS.md: add non-negotiable rule — NEVER mention proprietary terms in commits/releases - Code variables and function names sanitized project-wide - Force-pushed rewritten history to remote
This commit is contained in:
@@ -175,22 +175,22 @@ class TestPromptLoader:
|
||||
load_prompt("xyz_nonexistent")
|
||||
|
||||
|
||||
class TestApplyFTMOMask:
|
||||
class TestApplyRiskMgmtMask:
|
||||
def test_output_same_length(self):
|
||||
from rdagent.components.backtesting.vbt_backtest import _apply_ftmo_mask
|
||||
from rdagent.components.backtesting.vbt_backtest import _apply_risk_mask
|
||||
dates = pd.date_range("2024-01-01", periods=100, freq="1min")
|
||||
close = pd.Series(1.10, index=dates)
|
||||
signal = pd.Series(np.where(np.arange(100) % 2 == 0, 1.0, -1.0), index=dates)
|
||||
masked, metrics = _apply_ftmo_mask(signal, close, leverage=1.0, txn_cost_bps=2.14)
|
||||
masked, metrics = _apply_risk_mask(signal, close, leverage=1.0, txn_cost_bps=2.14)
|
||||
assert len(masked) == len(signal)
|
||||
assert isinstance(metrics, dict)
|
||||
|
||||
def test_flat_signal(self):
|
||||
from rdagent.components.backtesting.vbt_backtest import _apply_ftmo_mask
|
||||
from rdagent.components.backtesting.vbt_backtest import _apply_risk_mask
|
||||
dates = pd.date_range("2024-01-01", periods=200, freq="1min")
|
||||
close = pd.Series(1.10, index=dates)
|
||||
signal = pd.Series(0.0, index=dates)
|
||||
masked, metrics = _apply_ftmo_mask(signal, close, leverage=1.0, txn_cost_bps=2.14)
|
||||
masked, metrics = _apply_risk_mask(signal, close, leverage=1.0, txn_cost_bps=2.14)
|
||||
assert isinstance(metrics, dict)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user