Hi all! I've started working on putting together some tools for use with quantconnect. This is under a free/open source project, generally in a character of BSD licensing, mainly using Python.
My own focus has been exclusively on FX markets. I'll try to publish a ref for the support code once I've worked out the packaging here. I think I've learned today that we can use requirements.txt in our algorithm sources? So, I'll try to publish to PyPI. Candidly, I'm still working out how to put together an algorithm support library though, lol. (Parsing the backtest json file was maybe a start, can now produce an xarray dataset for each chart, hopefully chi square analysis may follow later given different parameter sets for each algorithm. I'm focusing on decision logic with numeric indicators.)
I wonder, is anyone else testing with FX?
Mia Alissi
Hi Sean! It's great to hear about your open-source project focused on FX markets. Here's some information to help you get started with developing your tools and integrating them with QuantConnect:
Adding Forex Securities: You can use the
add_forex
method in theQCAlgorithm
class to add Forex securities to your algorithm. Here's a basic example:Using External Libraries: You can specify external Python libraries that your algorithm depends on using a
requirements.txt
file. QuantConnect will automatically install these libraries for you.Custom Data Sources: If you need to integrate unique datasets, you can create custom data sources by defining a class that inherits from
PythonData
. This allows you to handle data in a custom format.Set Up Brokerage Model: Use the
SetBrokerageModel
method to define the brokerage model that suits your FX trading strategy. This ensures your algorithm aligns with your trading objectives.Handling Forex Data: To access Forex data, you can index the
quote_bars
orticks
properties of the currentSlice
with the ForexSymbol
. Here's an example:By following these steps, you can effectively develop and deploy FX trading algorithms on QuantConnect. If you have any more questions or need further assistance, feel free to ask!
Sources: FOREX Data - QuantConnect.com, Forex - QuantConnect.com, Requesting Data - QuantConnect.com, Basic Template Forex Algorithm, Micro Study: Yen Carry Trade
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Sean Champ
Thanks Mia et al, I'll take a look at the API for the brokerage model and data parts. There are docs about this feature, it seems?
Sean Champ
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!