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:alex.mcmurray@efinancialcareers.comin 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
3 Reasons Your Credit Card Issuer Could Close Your Account - NerdWallet
How Traceable Are Monero Transactions Compared To Bitcoin? Cybersecurity Expert Reveals
Omega Pizza-Roast Beef -Seafood Middleton Menu
Diario Las Americas Rentas Hialeah
Ups Stores Near
DPhil Research - List of thesis titles
Nfr Daysheet
Walgreens Alma School And Dynamite
Ou Class Nav
Tribune Seymour
Paketshops | PAKET.net
Midway Antique Mall Consignor Access
Turbocharged Cars
Watch TV shows online - JustWatch
Walthampatch
Tracking Your Shipments with Maher Terminal
What is Cyber Big Game Hunting? - CrowdStrike
A rough Sunday for some of the NFL's best teams in 2023 led to the three biggest upsets: Analysis - NFL
D10 Wrestling Facebook
Buy PoE 2 Chaos Orbs - Cheap Orbs For Sale | Epiccarry
Truth Of God Schedule 2023
PowerXL Smokeless Grill- Elektrische Grill - Rookloos & geurloos grillplezier - met... | bol
Johnnie Walker Double Black Costco
What Is The Lineup For Nascar Race Today
E32 Ultipro Desktop Version
Tire Plus Hunters Creek
Catchvideo Chrome Extension
Wku Lpn To Rn
Truck from Finland, used truck for sale from Finland
Penn State Service Management
30+ useful Dutch apps for new expats in the Netherlands
Ihs Hockey Systems
The Posturepedic Difference | Sealy New Zealand
Missing 2023 Showtimes Near Grand Theatres - Bismarck
R/Orangetheory
Myra's Floral Princeton Wv
Learn4Good Job Posting
Grays Anatomy Wiki
Chattanooga Booking Report
What Are Digital Kitchens & How Can They Work for Foodservice
Soulstone Survivors Igg
Shuaiby Kill Twitter
Ucsc Sip 2023 College Confidential
Emily Browning Fansite
Leland Nc Craigslist
6576771660
60 Days From May 31
Pgecom
Jane Powell, MGM musical star of 'Seven Brides for Seven Brothers,' 'Royal Wedding,' dead at 92
Festival Gas Rewards Log In
One Facing Life Maybe Crossword
Booked On The Bayou Houma 2023
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.