All Collections
Cody AI - Trading Assistant
Cody - AI Trading Assistant Overview
Cody - AI Trading Assistant Overview

Write trading strategies in plain english, convert them to python code and run!

Quadency Customer Service avatar
Written by Quadency Customer Service
Updated over a week ago

Cody: AI Strategy Assistant - this is our latest bot that has the power to replace all bots!

What is it?

Cody is a bot that lets you write strategies in plain language (English, Spanish, French, or any other international language). With the press of a button, the bot will generate python code required to run the strategy on Quadency's bot framework, giving you all the power of historical data for backtesting and exchange connectivity for live order execution.

What types of strategies are supported?

You can create virtually infinite type of strategies. If you can imagine it, Cody can code it. Early beta release has some limitations (see below), but it is still a very capable bot. Generally, trading strategies that rely on pricing data (latest and historical) and any kind of mathematical analysis of this data (technical or statistical) can be built.

Some examples you can try:

Simple DCA:

Buy 0.01 BTC every Sunday at 6PM EST. Don't buy above 15000. Sell when profit target of 10% has been reached.

Technical Indicators

Buy DOGE/USDT if RSI is oversold and price is below the lower band of the Bollinger Bands indicator. Sell when profit > 5%.

Buy $10 worth of ETH every day if price is below 200 day moving average. Use a 10% trailing stop and 5% profit target.

Portfolio Builder

Create a portfolio with the following allocations:

BTC: 50%
ETH: 25%
DOGE: 15%
MATIC: 10%

Note: the above strategy will currently fail to backtest, but can be run live successfully.

In Spanish

Compre $ 10 USD en BTC todos los días a las 5 p.m. Deje de comprar cuando el precio esté por encima de $ 25000

And many more, try it yourself!

What type of strategies are NOT supported?

Strategies that require real-time monitoring of prices, and order book data are not currently supported. These include arbitrage, grid trading, market making, etc. You can of course trade these strategies using the pre-built bots we offer.

Important Notes and Limitations:

  • Strategy code generated by Cody will often require some tweaks to work correctly. The more detailed you are with your requirements, the closer the final result will be.

  • You may edit/update the generated code to suit your needs

  • Be sure to run a backtest to make sure the code executes as expected. Not all generated strategies can be backtested, and you may encounter errors if that is the case. If the backtest fails, check the logs for any errors that can be fixed

  • If the generated code isn't exactly correct, try re-generating again. Often the AI will get it right in a couple of tries.

  • If you are not comfortable with coding and don't have a programming background, you can join our discord to request assistance from community members and our team.

  • Feel free to share the code with others if you come across a strategy that works.

  • At this time, importing external libraries is not supported. This may change depending on the demand from users.

  • Any import statements or other potentially malicious code is automatically sanitized

  • Cody, and other bots run in an isolated container in a cloud separate from our main infrastructure.

Step By Step Guide

  1. Select the exchange, and account to run Cody on

  2. Enter an "Allocated Capital". This amount is used for performance calculation (compared with your ending capital to derive the return), and depending on the strategy, can be used to limit the amount of funds the bot will use.

  3. Select an Execution Interval - this is the timeframe at which the logic in "handle_data" function is executed. Think of this as a candle timeframe on a chart. For example, if 30 Minute execution interval is selected, the handle_data function will be called at 8:00, 8:30, 9:00, 9:30 etc. Same applies for other intervals. Choose the appropriate interval for your strategy. For example, if your strategy is to "Buy $5 in BTC every 5 minutes until $500 have been spent", then choose the 5 Minute execution interval.

  4. Type in your strategy in the Strategy field (refer to examples above for tips)

  5. Hit Generate Code button and wait for Cody to respond with a python script that implements the desired strategy.

  6. Once the strategy has been populated. Verify that the code does what you described. If not, feel free to make any changes or improvements. Or try generating again to see if the result is different or better.

  7. Click Backtest to try running the strategy on historical data.

  8. If the results are satisfactory, you may start the bot live on the selected account

Remember, it is important to choose the ideal timeframe for your particular strategy, and lower timeframe are slower to backtest as they require more data to be processed.

Did this answer your question?