How to write Python trading algorithms, the secrets (2024)

Just because you want to break into the algorithmic trading space doesn't mean you have to use C++. Jane Street uses Ocaml, crypto firms use either Python or Java.

Python gets some disrespect from C++ purists in the space but definitely has its uses.

If you're a python afficionado looking to dip your toes into high frequency trading (HFT), be it solo or at a large firm, there are a number of ways you can make yourself either attractive to employers or effective in the space yourself.

In a recent webinar on algorithmic trading with python from crypto trading and analytics firm ProfitView, co-founder and former BofA quant Jahan Zahid went through the process of writing a trading algorithm and gave some tips and tricks along the way.

You should be using cubic spline

Oftentimes, market data can be quite scattered and hard to collate into meaningful patterns. Zahid says you therefore need to take "little bits of data here and there, and you need to come up with a smooth surface".

A tool that can help with this is the cubic spline.

Cubic spline is a tool available in the python library SciPy (scientific python). Wolfram Mathworld defines it as "constructed of piecewise third-orderpolynomialswhich pass through a set of mcontrol points."

When comparing the spline's results to his histogram data, Zahid said they fit together well and that "the nice thing about it is we can take derivatives of that function."

Avoid the mistake of not looking at log-normal returns

If you're a total newcomer, this information might slide under the radar, but Zahid says "typically in-industry you look at log-normal returns."

Non-normal returns distribution is "a distribution of market performance data that doesn’t fit into the bell curve." according to Asymmetry Observations.

Zahid says, for example "if an asset goes up by 1% then down 1%, it does not return to the same value."

Ensuring you are using the correct data distribution can be the key to effectively implementing your trading strategies. If you're an entry level algo writer, this can also serve to indicate a knowledge of industry practices.

Using that information, Zahid says we should be able to "plot out 5, 10 or 30 minutes from now, what the distribution of returns will look like."

Get coding, simple as that.

Small tips and tricks are all well and good but getting in the right frame of mind can be a bit more difficult. In the case of coding trade algorithms, the best way to improve is simply by doing.

Zahid says "sometimes,the best way to learn is just to get to work and start coding."

Broadening your coding knowledge with tools like Jupyter Notebook can of course be helpful, but Zahid says that "if you’re an aspiring trader you’re gonna learn so much more by getting off Jupyter and getting on with writing code that actually trades.

Click here to create a profile on eFinancialCareers. Comment ANONYMOUSLY on articles and make yourself visible to recruiters hiring for top jobs in technology and finance.

Have a confidential story, tip, or comment you’d like to share? Contact:[email protected]in the first instance.

Bear with us if you leave a comment at the bottom of this article: all our comments are moderated by human beings. Sometimes these humans might be asleep, or away from their desks, so it may take a while for your comment to appear. Eventually it will – unless it’s offensive or libelous (in which case it won’t.)

How to write Python trading algorithms, the secrets (2024)
Top Articles
How to remove malware from a Mac or PC - Norton
23 Real Estate Email Templates That Will Generate Business
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Energy Healing Conference Utah
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Pearson Correlation Coefficient
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Movies - EPIC Theatres
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Mia Malkova Bio, Net Worth, Age & More - Magzica
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Nfsd Web Portal
Selly Medaline
Latest Posts
Article information

Author: Merrill Bechtelar CPA

Last Updated:

Views: 6594

Rating: 5 / 5 (70 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Merrill Bechtelar CPA

Birthday: 1996-05-19

Address: Apt. 114 873 White Lodge, Libbyfurt, CA 93006

Phone: +5983010455207

Job: Legacy Representative

Hobby: Blacksmithing, Urban exploration, Sudoku, Slacklining, Creative writing, Community, Letterboxing

Introduction: My name is Merrill Bechtelar CPA, I am a clean, agreeable, glorious, magnificent, witty, enchanting, comfortable person who loves writing and wants to share my knowledge and understanding with you.