Rust: An attempt to quantify research _rust

Source: Internet
Author: User

We know that at present in quantitative research (mainly refers to the test, rapid validation, rather than trading or production phase), the industry's main tool language is python,matlab,r,julia, such as the Dynamic language (Julia Movement has), followed by c++,java,c# ... etc. static language.

Rust is a security, performance and concurrency-oriented programming language developed by Mozilla, and a system-level programming language that has attracted much attention in recent years and is quite modern, innovative and pragmatic. Based on a preliminary understanding of the many characteristics of rust, I personally believe that rust may be suitable for use in quantifiable trading or production phases, as it is easy to reduce potential bugs in the trading code and to debug production. The challenge, of course, is to be recognized in the industry. For example, most of the trading interface in the future will be a long time in C + + mode.

Today, the main discussion is whether the rust is suitable for quantitative research, that is, it is easy to use, regardless of industry approval.

My simplest idea is that if you rewrite the Julia Research Framework with rust, the difference between the efficiency of policy development and the speed at which the policy is run is different. If there is a cost-effective upgrade, that is the description of the appropriate, the contrary is not appropriate.

The Rust resource pool can refer to:

Https://github.com/kud1ing/awesome-rust

First, the basic discussion

1. Data Organization module
(1) The majority is from the third party CSV file => Unified into standardized source data format (CSV).
(2) Standardized source data format (CSV) => MySQL, Sqlite3 or SQL Server, or HDF5 and other policy base data.
(3) The Bar/tick format of the policy underlying data => policy.
(4) Related Data update procedures.

Rust basically has the above related library, specifically as follows:
Burntsushi/rust-csv =>csv.
Chrono 0.2.25 =>date,time
Aldanor/hdf5-rs =>hdf5
Blackbeam/rust-mysql-simple =>mysql
Linuxfood/rustsqlite-sqlite3 =>sqlite
Serde =>serialize, deserialize

Comprehensive evaluation: The feasible Index of rust: 4 stars.
Python:5 Star
Julia:4 Star

2. Strategy Organization module
(1) The Data organization expression power.
(2) IDE. => strategy organization is convenient to write.
(3) Related basic statistics kits. => Report Output

Julia has dict structure, Array, and Rust have HashMap, Vec. Both have generics. The expression of rust and Julia,python in the data organization is certainly not a problem.

Ide. Rust and Julia can use atom, at least I do. But in use, Julia takes advantage. And rust, I currently also combine atom and shell in use, although not Julia convenient, but the basis of little impact.

Julia's statistical toolkit, although compared to matlab,python,r a order of magnitude, but there are more advantages than rust. Rust has very few related statistical packages and very limited functionality. It is estimated that large parts of the wheel have to be reconditioned. or just wait. But believe that soon there will be new bags out. In a word, the ecological limitation of rust in this aspect will have a great effect on the output module of the report.

Comprehensive evaluation: The feasible index of rust: 2 stars.
Julia:4 Star
Python:5 Star

3. Policy Output Module
(1) Related drawing kits. => Trading Results Show
(2) IO. => flow output to CSV or Excel, easy to find and compare to the water is correct.

Rust Paint has gnuplot, you can also consider matplotlib (actually matplotlib-rs). But compared with Julia's gadfly, Pyplot, plots, Winston, Rust's drawing library is also relatively elementary, the choice is also very small.

In the paint, R, Python or to praise a bit, it is worth the language learning, many products, the choice of large.

Comprehensive evaluation: The feasible index of rust: 1 stars.
and R, Python:5 star. Julia:3 Star.

Ii. Comparison of Practice

4, the strategy realizes the efficiency
(1) The same CTA strategy, I write with Julia, the strategy needs to use 1000 lines, then the amount of rust code will be how much.
(2) The implementation of the same strategy, the time spent in different languages. For example, using Julia to achieve, from writing to output the correct results, the use of half an hour, rust is how much.

5. Strategy Running efficiency
(1) For example, the same CTA strategy, Julia to run down the need for 10 seconds, rust need how many seconds.
(2) at different levels of data (1 million, 10 million, or 100 million), how bad is this bar/tick?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.