*Updated as of 08/08/23 – Disclaimer: There is currently no active competition, and the platform and competition registration have been closed. Stay tuned to RBC Borealis’s social channels to find out if the competition will open again.
You can visit this page to learn more about Prism, view the platform demo and more.
RBC Borealis is gearing up to open a public algorithmic trading competition on Prism — a simulated synthetic financial market that supports algorithmic trading on a fictional stock called “PRSM”. Participants will aim to forecast and exploit one another’s actions, testing and perfecting their trading strategies and algorithms and working off of a common source of data. The Prism platform will evaluate agents’ models, offer order book visibility, the ability to place trades, and get metrics on how models participating in the competition are performing relative to one another. The leaderboard will display total profit or loss standing, as well as unrealized profit and loss.
The competition is set to open on January 31, 2023, 2 PM EST. You’re invited to apply!
Everyone is welcome to apply to participate in this friendly, light-hearted competition. The number of participants for the inaugural trading challenge is capped at 50. Traders with the three highest realized profits at the end of the competition will win a cash prize up to $1,000 CAD.
Once selected for participation, competitors can access:
• A UI reporting the state of the market and allowing one to place trades manually.
• Documentation explaining how to interact with Prism servers.
• Tutorials with examples to demonstrate how to create and test a trading agent.
• A testing environment to test your agent before the competition starts.
• A manual user interface to place buy/sell orders (for participants who prefer trading manually).
Competition Format
A Prism competition episode consists of a default trading agent, referred to as the Fundamental Agent (FT), which provides market liquidity as well as default market dynamics. The FT’s trading strategy remains undisclosed and varies between episodes. Each participant must submit a trading agent to qualify for the prizes, and each participant can control only one agent during an episode.
Participants are ranked according to realized profits, and the top 3 ranking participants are awarded prizes as listed in the “Scoring” section.
Testing Environment
Prism’s testing environment allows participants to guarantee their agent can interact with the Prism server. The testing environment shares the same API and data contracts as the Competition environment. The FT used in the trading environment is different than the FT used in the Prism competition; this is to discourage memorization of the FT’s action space.
Scoring
Participants are ranked according to their realized profits. Participants with the three highest realized profits will be chosen as winners.
Note: to qualify for a prize, the majority of your trades must have been submitted through a trading agent, and not through the manual interface. The latter exists only as a diagnostic and verification tool. After the competition, the Prism team will contact the winners to verify their strategy.
Rank | Prize (CAD) |
1st | $1,000 |
2nd | $500 |
3rd | $200 |
Trading Rules
• Each participant must submit a trading agent. The manual trading interface exists only for diagnosis and verification.
• Each trading agent is rate-limited to 20 requests/second.
• Participants can execute one of the following instructions:
• Query current market dynamics like order volume at every price.
• Query user profile metrics like wealth, position, and current profit/loss.
• Instruct their agent to submit a limit order.
• Instruct their agent to cancel an outstanding limit order.
• Agents are subjected to both a position and a budget constraint, as outlined below.
• The position limit is expressed as a number of shares, and is enforced as follows:
• When a new bid order is submitted, Prism calculates what the agent’s new position would be if the submitted order plus all other outstanding agent bid orders were filled. If the new position is greater than the position limit, the submitted bid order is rejected. An outstanding bid limit of 50 stock units is imposed on agents.
• When a new ask order is submitted, Prism calculates what the agent’s new position would be if that order plus all other outstanding agent ask orders were filled. If the absolute value of the new position is greater than the position limit, the new ask order is rejected. An outstanding ask limit of 10 stock units is imposed on agents.
• The budget constraint is enforced as follows:
• When a new bid order is submitted, Prism calculates the agent’s new wealth if the submitted order plus all other outstanding agent bid orders were filled. If the new wealth would be less than 0, the new bid order is rejected.
• All agents begin with a starting wealth of $500.
Understanding the Prism Dashboard
The Prism server offers a dashboard to visualize market dynamics like recent trades, bid/ask data and summary statistics. Here’s how it looks.
Prism dashboard preview.
The Prism dashboard contains the following information:
1️⃣ Stock Price
The current price that the stock ‘PRSM’ is trading at based on market activity.
2️⃣ Depth Chart
A pictorial representation of the available bid and ask orders, and their spread.
3️⃣ Bid/Ask Chart
A tabular representation of the available bid and ask orders.
4️⃣ Price Chart
A chart showing the stock price fluctuation over the last 60 seconds. The bubbles represent trades, with the radius being proportional to the traded volume.
5️⃣ Recent Trades
A tabular representation of trades that have occurred in the past 60 seconds. The table is divided into two halves, each half representing a trader. For each trader we have information like:
• volume and price information (ex: 23 @ 50.00)
• trade status: “F” implies the trade closes the trader’s order Fully, and “P” implies Partially.
• type of trade:
• STC = Sell To Close
• STO = Sell To Open
• BTO = Buy To Open
• BTC = Buy To Close
6️⃣ Trade Flows
A chord diagram representing trade interaction between all market participants in the last 60 seconds. The ribbon size indicates the number of shares that were exchanged between two participants.
7️⃣ Summary Statistics
A tabular representation of global market statistics.
• Trade Dispersion measures the inequality amongst participants in contributing to the total market volume. The measure is high if all clients contribute equally to the total volume, and low if only one client is responsible for the entire volume.
How to use the manual interface to place trades.
The manual interface can be accessed through the Prism Dashboard page. Once you’re invited to participate in the Prism market, you can log into Prism and view the following interface. The manual interface is disabled if the competition hasn’t begun or if you haven’t registered for the competition episode. Note that the competition requires an algorithmic agent for qualification, and the interface is supplied only for quick verification and diagnosis.
An information panel from a user interface.
If you click the ‘Manual Interface’ button, you’ll see the following interface:
An information panel and a manual trading user interface.
You can place a trade by entering a price and quantity for a limit order, and then clicking the ‘Buy’ or ‘Sell’ button. Prism presently only supports limit orders.
You can also cancel all of your pending orders (i.e. orders that haven’t yet been matched) by clicking the ‘Cancel Unfilled Orders’ button.
How to Get Started with Prism
Prism is an artificial exchange in which participants (agents) can submit trade orders via an API. This guide will help you set up your Python environment and make your first few calls to the Prism server.
Take a look at Prism’s Quickstart (below) to help you get set up with building your own trading agent. Alternatively, you can choose to trade yourself manually using Prism’s Manual Interface.
How to Register for Prism
Registration for Prism is now closed. You can visit this page to learn more about Prism, view the platform demo and more.
Install Poetry
Prism uses Poetry to manage Python dependencies. The first step is to install Poetry on your machine using instructions at Docs – Poetry.
Create a Python Virtual Environment
You can use your favourite Python Virtual Environment manager. Here we provide an example with Anaconda. The Python Version in Prism is ‘3.9’. You can also verify the version used through ‘pyproject.toml’ included in your starter kit.
$ conda create -n prism python==3.9
$ source activate prism
If you wish to run the included Jupyter notebooks for tutorials, additionally run the following.
python -m ipykernel install --user --name prism
Now run
# Install dependencies from the poetry.lock
$ poetry install
Connect to The Prism API
In order to contact the Prism API, you will need:
1. The Prism Server URL:
• You can get this by signing into Prism
• Under ‘Choose Your Instance’, select ‘Test Instance’. Note: When you’re participating in a live competition, you can use the competition instance.
• Click on ‘API Link’ and the link is copied.
2. Your Access Token:
• Next to the ‘API Link’ from the previous step is another field, ‘Access Token’.
• Click on it, and your token is copied.
3. Your Alias:
• Prism uses your alias to represent you on the Prism Leaderboard.
• You can retrieve your chosen alias by signing into Prism.
Now we’re ready to make our first call to Prism. Register yourself by issuing the following Curl request:
$ curl -X POST "<test-server-url>/api/v1/accounts" -d "{\"alias\": \"<your-alias>\"}" --header "Content-Type: application/json" --header "Authorization: Bearer <your-access-token>"
> "5d11fc1f-aa8a-4b83-945d-802e1790b9ce" # <-- Your Client ID!
The call returns a unique client id to be used in future requests to Prism. Congratulations! You just made your first API call to Prism and are ready for next steps.
Create A Trading Agent
You’re ready to create your own trading agent! You can choose to write your own scripts using the Prism API schema (available after log-in), or you can use our Starter Kit (which includes tutorials) to help you develop your own agent.
👋 Please note Prism is available to Authorized Participants only.
No participant will create more than one account, or make any agreement with another participant. Doing so will be grounds for disqualification.
News
2022 Report: Canadian businesses’ use of AI
News
Developing the next wave of AI leaders
News