QuantRocket logo

Disclaimer

Manual Trading

Before we schedule fx-bizday for live or paper trading, we'll run it manually to view the orders it would generate.

Account allocation

Before we can trade, we must allocate fx-bizday to one or more accounts, and specify how much of the account's capital to allocate. Open quantrocket.moonshot.allocations.yml, edit the account number to match your live or paper brokerage account, and edit the capital allocation percentage as desired.

If you don't already have a quantrocket.moonshot.allocations.yml in the /codeload directory (i.e. top level of the Jupyter file browser), you can execute the following command to copy it over. Otherwise, append the new allocation to your existing file.

Generate Moonshot orders

Now we can try to run Moonshot and generate orders. Depending on how recently you collected data and whether the market is currently open, you might get an error like the following:

Moonshot is trying to protect us from trading with stale data. For testing purposes we can work around this error by using the --review-date parameter to tell Moonshot to generate orders as if it were an earlier date and time. Set the review date to an earlier date and time that is within the date range of your data. Moonshot returns a CSV of orders, which we format for the terminal with csvlook:

In the above example we simulate running the strategy just after 3 AM, which results in an order to sell EUR.USD.


Next Up

Part 8: Schedule Live Trading