RC2_SYMBOL_UNKNOWN_KWARG
Symbol()does not accept that keyword argument. Valid:ticker,broker,session,trade.
What it means
Symbol() takes exactly four keywords — ticker, broker, session, trade — and nothing else. Anything outside that set is refused at compile time.
This one used to be silent, and that is the whole point of the page. Until the kwarg set was closed, an unrecognised keyword was simply dropped: Symbol("SPY", exchange="NYSE") compiled clean, the exchange constraint the author thought they had written never existed, and the slot went to the binder unconstrained. On a real-money platform a constraint that is quietly ignored is worse than one that is rejected — so it is now an error.
Why it happens
An invented constraint the language doesn’t have:
class InventedKwarg(Strategy): trade = Symbol("SPY", exchange="NYSE") sizing = FixedCapital()
def execute(self): if self.trade.is_flat: self.buy(self.trade)Or a typo in a real one. This is the case the old silent-drop behaviour hid best — the strategy ran, unlocked, for as long as nobody looked:
class TypoKwarg(Strategy): trade = Symbol(sesion=USEquityDaily) sizing = FixedCapital()
def execute(self): if self.trade.is_flat: self.buy(self.trade)How to fix it
Use one of the four, spelled exactly:
class FourKwargs(Strategy): trade = Symbol(ticker="SPY", broker="tradestation", session=USEquityDaily, trade=True) spy = Symbol(ticker="SPY") sizing = FixedCapital()
def execute(self): spy_sma = SMA(50, on=self.spy) if self.spy.close > spy_sma.value and self.trade.is_flat: self.buy(self.trade)There is no exchange, currency, or asset-class argument. What an instrument is comes from the broker’s own instrument record when the slot is bound; the strategy only says which slot it needs.
Related
Symbol()RC2_PARAM_UNKNOWN_KWARG— the identical story forParam().RC2_SYMBOL_TICKER— a recognised keyword with an unusable value.