Research › Interactive tools

The recurrent reinforcement learning trader

An agent that learns a trading position directly, online, one bar at a time. An echo state network turns the market's recent history into features; a recurrent policy maps them to a position between fully short and fully long; and the agent climbs a quadratic risk-adjusted utility that charges it for every trade and pays or charges it funding. Based on Borrageiro, Firoozye & Barucca, IEEE Access (2022) and its Code Ocean capsule. Everything runs in your browser.

Cumulative return, net of trading and funding costs

After the warm-up. The cost-blind agent is identical but learns as if trading were free; it is still charged for its trades.

Where the agent's return comes from

Price moves earned by the position held, funding received or paid, and trading costs.

Price and position

Last 1,500 bars. The position runs from −1 (fully short) to +1 (fully long).