Lower approved strategy edge threshold to 0.49
All checks were successful
deploy / deploy (push) Successful in 31s
All checks were successful
deploy / deploy (push) Successful in 31s
Proof: Strategy gross edge threshold is lowered to the user-approved 0.49 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 0.99 percent threshold 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
c91c8f00de
commit
72b399d91f
3 changed files with 7 additions and 6 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: "0.99"
|
STRATEGY_GROSS_THRESHOLD_PCT: "0.49"
|
||||||
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: 0.99,
|
strategyGrossThresholdPct: 0.49,
|
||||||
strategyInitialArmed: false,
|
strategyInitialArmed: false,
|
||||||
strategyMaxNotionalEure: 5,
|
strategyMaxNotionalEure: 5,
|
||||||
strategyPriceMaxAgeMs: 30_000,
|
strategyPriceMaxAgeMs: 30_000,
|
||||||
|
|
|
||||||
|
|
@ -4,21 +4,22 @@ import { readFileSync } from 'node:fs';
|
||||||
|
|
||||||
import { loadConfig } from '../src/lib/config.mjs';
|
import { loadConfig } from '../src/lib/config.mjs';
|
||||||
|
|
||||||
test('repo default strategy threshold reflects explicitly approved 0.99 percent edge', () => {
|
test('repo default strategy threshold reflects explicitly approved 0.49 percent edge', () => {
|
||||||
const previous = process.env.STRATEGY_GROSS_THRESHOLD_PCT;
|
const previous = process.env.STRATEGY_GROSS_THRESHOLD_PCT;
|
||||||
delete process.env.STRATEGY_GROSS_THRESHOLD_PCT;
|
delete process.env.STRATEGY_GROSS_THRESHOLD_PCT;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const config = loadConfig({ envPath: '/tmp/unrip-no-such-env-file' });
|
const config = loadConfig({ envPath: '/tmp/unrip-no-such-env-file' });
|
||||||
assert.equal(config.strategyGrossThresholdPct, 0.99);
|
assert.equal(config.strategyGrossThresholdPct, 0.49);
|
||||||
} finally {
|
} finally {
|
||||||
if (previous == null) delete process.env.STRATEGY_GROSS_THRESHOLD_PCT;
|
if (previous == null) delete process.env.STRATEGY_GROSS_THRESHOLD_PCT;
|
||||||
else process.env.STRATEGY_GROSS_THRESHOLD_PCT = previous;
|
else process.env.STRATEGY_GROSS_THRESHOLD_PCT = previous;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
test('kubernetes strategy threshold deploys the approved 0.99 percent edge', () => {
|
test('kubernetes strategy threshold deploys the approved 0.49 percent edge', () => {
|
||||||
const manifest = readFileSync(new URL('../deploy/k8s/base/unrip.yaml', import.meta.url), 'utf8');
|
const manifest = readFileSync(new URL('../deploy/k8s/base/unrip.yaml', import.meta.url), 'utf8');
|
||||||
assert.match(manifest, /STRATEGY_GROSS_THRESHOLD_PCT: "0\.99"/);
|
assert.match(manifest, /STRATEGY_GROSS_THRESHOLD_PCT: "0\.49"/);
|
||||||
|
assert.doesNotMatch(manifest, /STRATEGY_GROSS_THRESHOLD_PCT: "0\.99"/);
|
||||||
assert.doesNotMatch(manifest, /STRATEGY_GROSS_THRESHOLD_PCT: "1\.49"/);
|
assert.doesNotMatch(manifest, /STRATEGY_GROSS_THRESHOLD_PCT: "1\.49"/);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue