Lower approved strategy edge threshold
All checks were successful
deploy / deploy (push) Successful in 33s
All checks were successful
deploy / deploy (push) Successful in 33s
Proof: Strategy gross edge threshold is lowered to the user-approved 0.99 percent in repo defaults and Kubernetes deploy config; targeted threshold tests, dashboard build, and full npm test pass. Assumptions: User explicitly approved lowering below the previous 1.49 percent guard for the active BTC/EURe NEAR Intents pair; max notional and funds exposure are unchanged. Still fake: Venue-native terminal fill events, fee attribution, realized per-trade PnL, and full inventory-skew strategy controls remain incomplete.
This commit is contained in:
parent
7a059006d2
commit
c91c8f00de
3 changed files with 26 additions and 2 deletions
|
|
@ -78,7 +78,7 @@ data:
|
||||||
MARKET_REFERENCE_COINGECKO_URL: https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=eur
|
MARKET_REFERENCE_COINGECKO_URL: https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=eur
|
||||||
INVENTORY_SYNC_REFRESH_MS: "15000"
|
INVENTORY_SYNC_REFRESH_MS: "15000"
|
||||||
LIQUIDITY_REFRESH_MS: "30000"
|
LIQUIDITY_REFRESH_MS: "30000"
|
||||||
STRATEGY_GROSS_THRESHOLD_PCT: "1.49"
|
STRATEGY_GROSS_THRESHOLD_PCT: "0.99"
|
||||||
STRATEGY_INITIAL_ARMED: "false"
|
STRATEGY_INITIAL_ARMED: "false"
|
||||||
STRATEGY_MAX_NOTIONAL_EURE: "150"
|
STRATEGY_MAX_NOTIONAL_EURE: "150"
|
||||||
STRATEGY_PRICE_MAX_AGE_MS: "30000"
|
STRATEGY_PRICE_MAX_AGE_MS: "30000"
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ const DEFAULTS = {
|
||||||
'https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=eur',
|
'https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=eur',
|
||||||
inventorySyncRefreshMs: 15_000,
|
inventorySyncRefreshMs: 15_000,
|
||||||
liquidityRefreshMs: 30_000,
|
liquidityRefreshMs: 30_000,
|
||||||
strategyGrossThresholdPct: 1.49,
|
strategyGrossThresholdPct: 0.99,
|
||||||
strategyInitialArmed: false,
|
strategyInitialArmed: false,
|
||||||
strategyMaxNotionalEure: 5,
|
strategyMaxNotionalEure: 5,
|
||||||
strategyPriceMaxAgeMs: 30_000,
|
strategyPriceMaxAgeMs: 30_000,
|
||||||
|
|
|
||||||
24
test/strategy-threshold-config.test.mjs
Normal file
24
test/strategy-threshold-config.test.mjs
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
import test from 'node:test';
|
||||||
|
import assert from 'node:assert/strict';
|
||||||
|
import { readFileSync } from 'node:fs';
|
||||||
|
|
||||||
|
import { loadConfig } from '../src/lib/config.mjs';
|
||||||
|
|
||||||
|
test('repo default strategy threshold reflects explicitly approved 0.99 percent edge', () => {
|
||||||
|
const previous = process.env.STRATEGY_GROSS_THRESHOLD_PCT;
|
||||||
|
delete process.env.STRATEGY_GROSS_THRESHOLD_PCT;
|
||||||
|
|
||||||
|
try {
|
||||||
|
const config = loadConfig({ envPath: '/tmp/unrip-no-such-env-file' });
|
||||||
|
assert.equal(config.strategyGrossThresholdPct, 0.99);
|
||||||
|
} finally {
|
||||||
|
if (previous == null) delete process.env.STRATEGY_GROSS_THRESHOLD_PCT;
|
||||||
|
else process.env.STRATEGY_GROSS_THRESHOLD_PCT = previous;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
test('kubernetes strategy threshold deploys the approved 0.99 percent edge', () => {
|
||||||
|
const manifest = readFileSync(new URL('../deploy/k8s/base/unrip.yaml', import.meta.url), 'utf8');
|
||||||
|
assert.match(manifest, /STRATEGY_GROSS_THRESHOLD_PCT: "0\.99"/);
|
||||||
|
assert.doesNotMatch(manifest, /STRATEGY_GROSS_THRESHOLD_PCT: "1\.49"/);
|
||||||
|
});
|
||||||
Loading…
Add table
Reference in a new issue