Back

Custom MySQL database?

I have a algo that relies on a MySQL database. When it runs, it creates a small MySQL database and the tables. It stores transaction history and other information in about 12 tables. The tables tend to stay under 200 rows, however, a lot of the logic is done with MySQL queries. For example, I built in Rule 4210, Regulation T, and alter price quotes based on past slippage.

Is it possible to have a small custom database while running the backtests?
Update Backtest








This should be possible if you host the database from a port on your pc.

How to connect C# to MySQL

However, I am not sure whether quant connect supports:

using MySql.Data.MySqlClient;
0

From the LEAN open source project its definitely possible; but via our web platform I'm afraid not. You could make a REST API for your database -- and then relay requests via PHP or some web service.
0

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.


@DrewBrown Why does it need to be MySQL per se? If you are using small tables anyway, you can also simply store the information in arrays in your algorithm. This will ensure backtesting on the QuantConnect online platform is possible and gives you a much cleaner access to needed variables.

Besides that, the LEAN engine already automatically keeps track of some of the variables that you name in your post. E.g. you can save Order Tickets in an array to keep track of your submitted orders.
2

Check this one...Connect to Mysql

Dell

0

Update Backtest





0

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.


Loading...

This discussion is closed