diff --git a/lib/strategies/threshold.js b/lib/strategies/threshold.js index ecea61f..19203b3 100644 --- a/lib/strategies/threshold.js +++ b/lib/strategies/threshold.js @@ -1,13 +1,5 @@ import { BaseStrategy } from './base.js'; -/** - * Threshold (Contrarian) Strategy - * - * Logic: - * - If one side goes above a high threshold (e.g. 65%), bet the other. - * - Fixed bet size — no progression. - * - Simple mean-reversion assumption for short-term BTC markets. - */ export class ThresholdStrategy extends BaseStrategy { constructor(config = {}) { super('threshold', { @@ -33,7 +25,7 @@ export class ThresholdStrategy extends BaseStrategy { let signal = null; - if (yesPct >= trigger) { + if (yesPct >= trigger && noPct < 99) { signal = { strategy: this.name, side: 'no', @@ -42,7 +34,7 @@ export class ThresholdStrategy extends BaseStrategy { reason: `Yes at ${yesPct}% (≥${trigger}%), contrarian No at ${noPct}¢`, ticker: state.ticker }; - } else if (noPct >= trigger) { + } else if (noPct >= trigger && yesPct < 99) { signal = { strategy: this.name, side: 'yes',