Algotrading General

Evil_kitten
Evil_kitten

Anyone build algorithmic trading models? I've been playing around with it for about 6 months now -- just learning the basics and enjoying the challenge.

I've been writing mostly in Python (Quantopian) but do know R fairly well.

Any suggestions on books/forums/general strategies that you might recommend?

As I have been mostly focused on stocks, I'd like to know if anyone has built a model to trade cryptocurrencies? Anyone had any luck?

Appreciate any help/advice you can offer to a newbie!

All urls found in this thread:
https://en.wikipedia.org/wiki/Euler%E2%80%93Maruyama_method
http://traders-software.com/Trading%20Books/Robert%20Pardo%20-%20The%20Evaluation%20and%20Optimization%20of%20Trading%20Strategies/
https://github.com/5an1ty/BitBot/blob/master/README.md
http://spacedad.me
https://drive.google.com/folderview?id=0B1iikX5PwNx4d2dKQ3FTSWVRSDA&usp=sharing
viagrandad
viagrandad

Protip: computerized guessing is still guessing. You're gonna lose.

askme
askme

@viagrandad

True. I wouldn't ever risk anything that I couldn't afford to lose. Also would never go live without years of good backtesting + forward paper trading for 1+ year.

Mostly I enjoy the intellectual challenge that it presents.

RavySnake
RavySnake

Hey OP. I'm interested in this as well. I'm actively researching quantitative analysis in order to build a crypto trading bot. I haven't done enough research to be of any help to you but I have some books I've downloaded, though you may have heard about them already.

DeathDog
DeathDog

@Evil_kitten
Just got done with internship at firm that was doing neural network trading. I definitely want to get into that field, it was dope.

Fried_Sushi
Fried_Sushi

@RavySnake

Nice! The last few books I've read: a couple of Ernie Chan's books (quantitative trading/algorithmic trading), David Aronson (evidence based technical analysis), and a couple python for finance (o'reilly books). Not sure the popular opinion on those, but they seemed fine.

@DeathDog
Definitely interested in a NN model, but I'm hesitant to dive into black-box methodologies. Did you get access to some of the inputs/variables they were using?

CouchChiller
CouchChiller

Even I'm interested in this. There was an user a few months ago who pointed me in the right direction with some book recs. Trying to ping that user if he's here
I'm super interested in this as well. Bump for discussion

PurpleCharger
PurpleCharger

@viagrandad
Not if someone could figure out how to make a computer buy low and sell high. I don't know if it's possible though

Firespawn
Firespawn

@CouchChiller
i am here.

LuckyDusty
LuckyDusty

@Evil_kitten
I have a python trading bot for poloniex. I stopped developing it as i had no idea about trading models. If you post a throwaway email i can give it to you. Maybe you can pump it up to be more successful.

VisualMaster
VisualMaster

@LuckyDusty
ProTip: I cooked about 60 trading strategies before I found one that kicked ass. I've made over 200 now, and I have gotten about 6 great strategies out of it.

Persistence, my friend.

iluvmen
iluvmen

What does /ATG/ think of MATLAB?

I wrote some simple programs for modelling options in it, and I like it way better than Python or Java.

Also is Haskell any good?

Emberfire
Emberfire

@iluvmen
I used Java, I've never played with MatLab.

I hear it's pretty great, but I also hear it depends on community-created plugins to integrate into Interactive Brokers. Is that true?

TalkBomber
TalkBomber

@iluvmen
care to share some matlab scripts ?
I' currently writing my dissertation on an empirical comparison of option pricing models. You could really help me cross check some scripts I've already written myself.

ZeroReborn
ZeroReborn

@iluvmen
@TalkBomber

I just use Matlab for electronical calculations, but this sounds interresting.
Care to share?

eGremlin
eGremlin

@Firespawn
I don't believe you. For starters recommend those books to me I have a screenshot of them

Supergrass
Supergrass

@eGremlin
Robert Pardo's Evaluation and Optimization of Trading Strategies.

That's my go-to recommendation. If I suggested something else, it was probably that Mr Swing white paper on regime-switching or a few selections from my library on general HFT theory. Like, "All About High Frequency Trading" by Durbin.

Sound about right?

viagrandad
viagrandad

Bumped for righteous glory

idontknow
idontknow

@TalkBomber
@ZeroReborn
Nothing special dudes, I've used MATLAB for lots of university projects solving differential equations and I had some spare time.

I implemented the Black Scholes model in it, which also calculates the volatility from a Yahoo Finance spreadsheet, and churns out 2 approximations for option pricing (based on different methods of calculating volatility) and a simpel stochastic differential equation solver, like in this link (in the link it's in Python):

https://en.wikipedia.org/wiki/Euler%E2%80%93Maruyama_method

I'm planning to expand on this during summer break so I can make a simple script for hedging options or other derivatives.

Methshot
Methshot

@idontknow
Also MATLAB has a special "Finance Toolbox" that already has all those things, but my university license doesn't cover that. Implementing those things yourself is more fun anyway.

RumChicken
RumChicken

@Supergrass
Wow you're right about pardo. You recommended two more actually. You were also highly evasive about your income but rightly so since you said that it allows you to live comfortably.
What's your background? I'm gonna do engineering and will read those books in between studying.

VisualMaster
VisualMaster

got a system that i manually trade. in fact i live trade it and am profitable. need to code a bot because the setups are so specific i would be sitting at the computer for sometimes days without entries.

my 2 cents:
if you approach the problem from a traditional quant perspective, you will likely fail. remember the big boys have teams of people with likely far higher IQs than you and with greater experience trading than you. they also have market data going back as far as it goes with every major global market.

if i told a quant guy my strat, he'd would at first laugh. but he's a scientist so he'd backtest it for giggles. then he'd cry because something so simple shouldn't work.

if i told a traditional buy/hold investor, they would straight out tell me it would NEVER work.

good luck, to everybody. fwiw, i have 3 strats that work completely different and in different timeframes. they are capable of long and short entries.

FastChef
FastChef

@LuckyDusty

That'd be awesome! Thanks man. Would love to check out your work.

[email protected] is an old throwaway.

Ignoramus
Ignoramus

@FastChef

Thanks for the inspiration.... and totally agree - non-conventional approaches are my focus.. i.e., taking solutions to problems found in other domains and applying them to predicting stocks..

@Supergrass
Thanks for the recommendation. I willl read that book next.

Illusionz
Illusionz

@VisualMaster
Read that Pardo book. It'll elevate your game.

The dirty secret of all the big boys is that their "magic" is just as simple and straightforward as yours. "Quant" is all smoke and mirrors IMHO.

I've never seen anything to make me believe there's one all powerful strategy that works in every regime. It's all just simple tricks and nonsense.

@RumChicken
Biotech in college.
Programming everyday since boyhood.

Read everything. Study every trading/portfolio system you can find. Try everything and see what sticks. See above.

Crazy_Nice
Crazy_Nice

@Illusionz
pretty sure i've conversed with you before. i only recently became confident enough with my win% to look into properly coding a bot. my biggest challenged is establishing an exit when trades move against me.

got a folder of algo books you recommended from the last time.

if someone is looking for some human inspiration: market wizards series by jack schwager. the one thing all these guys had in common was pure obsession.

farquit
farquit

@VisualMaster
What kind of trading strategies?
Mostly TA?

Poker_Star
Poker_Star

@Crazy_Nice

You can work backwards. Study the distribution of your trades' high&lows. It'll hint at a good initial stop-loss. Then you can cross-optimize with some trailing stop logic if it's long term positions (>20 seconds). Read that Pardo book.

@farquit
Fun Fact:
Before The Great Depression there was this famous trader named Gann. He made a fortune trading according to his interpretation of the Zodiac.

I much prefer clearly defined math and repeatable results.

Methnerd
Methnerd

@Poker_Star
@Illusionz
Before I begin reading I wanna ask will I understand it? Do I need a special background in anything?
Btw what are your thoughts on Quintilian?

PackManBrainlure
PackManBrainlure

@Poker_Star
So I'm guessing no TA then?

I was planning on writing a TA bot for poloniex. I am not a firm supporter of TA but I do believe that especially with Crypto it is a self-fulfilling prophecy.

Nonetheless, thanks for the books I am going to read all of them. Just finished CFA 1 so this is going to be a good addition to my overal financial/trading knowledge.

Firespawn
Firespawn

@Poker_Star
i'm far better determining market direction now. i had trade a week ago move against me by 30 ticks and i looked at the data, i was right. so i held for another 5 mins. it swung my way and completely surpassed my profit exit for the rest of the day. most of my trades are longer than 1 minute. me and you operate in different timeframes. i'm not at your level :(.

still early going yet. i want another year of minute data in my records before coding anything. i don't know a fucking thing about coding. baby steps first. acquire data, forward test via live trading, then coding. shit is going to get crazy when i start trading correlated instruments.

hairygrape
hairygrape

@FastChef
sent

Deadlyinx
Deadlyinx

@Firespawn
You can get that data from eoddata.com for like $10

Methshot
Methshot

not a single mention of market impact
you are all small time and liars who read too much internet

TalkBomber
TalkBomber

@Deadlyinx
forward, real time data. even end of minute data is not quite accurate as i've submitted orders and had the bar move quite a few ticks against me. my confidence level will be very high if i can continue to live trade over the next year profitably. even with supplied data, i'd still have to code something to backtest my strat. and as i said, i know fuck all.

@Methshot
nobody here claimed to be big time. ES trade over 4 million contracts on brexit. i traded less than 100. my impact is fuck all. which is exactly how i like it.

RavySnake
RavySnake

@hairygrape
@LuckyDusty
Could you send me that too?
[email protected]

StonedTime
StonedTime

I'm new to coding and still learning basics and syntax with Python. Is there any good material for me to move onto about algo's after I gain some experience?

CodeBuns
CodeBuns

A lot of "quant trading" is doing things like reading an SEC filing before anyone can get. Or inputting an order before everyone else.

There are basic things which always happens. CEO gets caught fucking a little girl in the office? Stock prices will drop, you're goal as a quant trader is to put in the order first before traditional traders even hear the news.

There are millions of things like this, some of them not so obvious. Random variables x, y, and z go up and a and b go down means the stock price is about to jump up with 95% confidence 500 basis points.

I've been a hobbyist in quant trading for like 2 years now and I'm interning at KCG as a quant trader at the moment and this is the kind of internal shit they have.

In fact the CEO thing is what my manager said to me second day

Techpill
Techpill

@Methshot
Said the tripcode.

VisualMaster
VisualMaster

@Fried_Sushi
Did you get access to some of the inputs/variables they were using?
i only used the most basic stuff cause i had absolutely no idea what i was doing since i am 18. i was very intrigued by whole concept of the computers doing all the trading. i am not sure if the traders were using mostly learning technique or something else.

how do i into this field?

askme
askme

@VisualMaster
You need to be a programmer first.
Then you read a general book on HFT theory.
Pick a Broker with an API.
Build a trading engine.
Cook up some strategies.
Push the button that says "Start Making Money" and hope you didn't miss something.

ZeroReborn
ZeroReborn

@askme
I read the physics envy one and it was too tough for me. Didn't get the theorems and such

Stupidasole
Stupidasole

@askme

You seem to know your shit. I've some questions for you:

1º In the long term, would this type of trading be worth it compared to say investing in regular index funds?

2º What are some good forums/communities for this type of trading?

3º I've got programming chops and know how in machine learning and signal processing. How long would it take me to read up on HFT theory and start developing some strats?

Nojokur
Nojokur

@askme

tell that to jimmy simons

Fried_Sushi
Fried_Sushi

@iluvmen

matlab is the best modeling software in the business. if you don't know matlab you're fucking yourself

askme
askme

@Stupidasole


A good algo trader can do in a day what a good index fund does in a good year. Take that with a grain, because it doesn't scale-up in terms of % like index funds do. However, in terms of Input Capital v Output Profit, Algo blows everything else away by miles.


I wish I knew. Why do you think I'm here?
I keep my eyes on the related reddits but they're mostly abandoned. This is a solo mission.


How long does it take to learn Chess?
The programming isn't hard at all.

The hard part is strategy and that just takes a fuckload of trial & error. Feeling around in the dark, collecting maths, making educated guesses, backtesting everything you can think of until something sticks.

There are only a handful of off-the-shelf algo trading platforms out there to build strats on. Each has its own drastic limitations and most cost a fortune.

IMHO the only way to do this right is to build your own tools from scratch and obviously that takes some time.

When I first got into this I got a lot of smirky comments.
"if it was so easy, everyone would do it" .

I'm here to tell'yah it ain't that easy, but it's worth it.
pic related.

Spazyfool
Spazyfool

@askme

Thanks mate, I'll look up further on it then!

I owe you a beer.

Boy_vs_Girl
Boy_vs_Girl

@iluvmen
well used among the machine learning community, quite a few funds use it for research

you could actually use it to build your own algos too - there is connectivity developed for CQG for example, and algo trading toolkit, libraries for signal processing

no good for a proper HFT system but for a hobby/part time algo trading project it is a pretty decent option and the existing libraries can save you a fair bit of time

Evil_kitten
Evil_kitten

@CodeBuns
What are some good sources for this early info?

Crazy_Nice
Crazy_Nice

@Spazyfool
I owe you a beer.

What a stupid fucking thing to say on an anonymous online forum, cocksucker.

w8t4u
w8t4u

@Crazy_Nice
"he calls people cocksuckers on internet forums!"

w8t4u
w8t4u

@askme
ooh thanks, i was gonna do Finance major with CS minor,

but i might switch it around next year i guess

whereismyname
whereismyname

@askme

Just curious but how many of you that are doing this successfully are currently scraping for news data to enhance your trading capabilities?
Like Brexit for example

BlogWobbles
BlogWobbles

@viagrandad
half the time

Lunatick
Lunatick

@whereismyname
NLP is hard
Quantifying mood from say Twitter feeds is possible but also not very reliable. Regardless, while it's semi-useful to detect when there are rumors of X or Y at company Z with straightforward consequences (merger, bankruptcy etc.), and even then you'd be wide open to market manipulation (or I guess you can trust the SEC to actually find people who spread rumors to cash out, as if lol), large events like brexit I'm not sure how you'd get a machine to make sense of the news considering even human experts struggle to make sense of it.
Depending on your algorithm this may or may not be relevant anyway. If your typical strat timescale is in seconds, you're going to care more about market microstructure than whatever macro-scale news event is unfolding. Micro-scale strats can also be pretty safe: when the portfolio takes a -40% hit in 15 minutes you had long exited the market.

Snarelure
Snarelure

@Fried_Sushi
How would I use MATLAB for trading though?

Nojokur
Nojokur

@BlogWobbles
half the time

what are transaction fees and capital carry expenses?

100% of the time.

Spazyfool
Spazyfool

@LuckyDusty
yeah man please
[email protected]

SniperGod
SniperGod

@RumChicken
Which other two books did he recommend?

If anyone cares, I found a PDF of the Pardo book here: http://traders-software.com/Trading%20Books/Robert%20Pardo%20-%20The%20Evaluation%20and%20Optimization%20of%20Trading%20Strategies/

BinaryMan
BinaryMan

@LuckyDusty
Trying to get into this, i'd be very thankful.
[email protected]

SomethingNew
SomethingNew

@SniperGod
See @ZeroReborn

Booteefool
Booteefool

@ZeroReborn
@SomethingNew

Thanks, मेरे बेनामी दोस्त! खूब तरक़्क़ी कर!

haveahappyday
haveahappyday

@LuckyDusty
[email protected]
thanks man

Skullbone
Skullbone

@Booteefool
Are va ek aur desi. Shukriya

happy_sad
happy_sad

[email protected] -a throwaway I'm interested Op. Thanks

TurtleCat
TurtleCat

@LuckyDusty
me too:
[email protected]

SniperGod
SniperGod

@LuckyDusty
Would greatly appreciate it
[email protected]

Supergrass
Supergrass

@viagrandad
I have absolutely no idea of how trading works

Stark_Naked
Stark_Naked

@askme

What brokers with an API are available in Europe?

Spamalot
Spamalot

@LuckyDusty
[email protected]

Plzzzz

RumChicken
RumChicken

@Evil_kitten
what degree would be best to be taken up by an algo trading firm or department of a bank?

Assuming that the individual knows the essential languages.

I would suspect it would be some kind of quantitative one like the engineerings, actuarial, CS and then 2nd tier as finance, econ .

Techpill
Techpill

@RumChicken
More about skill then degree, in Australia at least.
I know an arts student who works in a trade desk. Did lots of hobby work

Spamalot
Spamalot

@LuckyDusty

Hopefully you're still here dude. If anyone else could forward it to me I'd appreciate that a lot.

[email protected]

Methnerd
Methnerd

@Spamalot
I want to see it as well,

[email protected]

Thanks /biz/raelis.

Stupidasole
Stupidasole

@Techpill
could you please tell me what kind of hobbies he did?

I've traded before with a little success, but, they were all a few month longs.

What other hobbies

idontknow
idontknow

@LuckyDusty
@LuckyDusty
Sorry to jump on the train, but I would appreciate the bot as well. I've been looking at trading models recently and this would help give me a head start. appreciate it.
[email protected]

AwesomeTucker
AwesomeTucker

Anyone heard of bitbot? What's the best algorithm to use? I'm installing it now...

https://github.com/5an1ty/BitBot/blob/master/README.md

whereismyname
whereismyname

Why hasn't no one mentioned that you can use quantopian to trade live stock using robinhood aka no commission?

CouchChiller
CouchChiller

@LuckyDusty
[email protected]

Much appreciated user!

Sir_Gallonhead
Sir_Gallonhead

Glad there's some interest in this. Maybe we could always keep a general going with some basic intro?

Anyways, I've been working with machine learning and sports betting. After I get that nailed down more I plan to go after trading. Getting data and building all your own shit definitely take a lot of time but it'll pay off in the end.

TurtleCat
TurtleCat

Some fucks who post in RGT threads developed a 98% accurate trading algo over the course of three years. They call it "the spacedad algorithm" they've proved it's accuracy multiple times and instead of giving it out they just gave the website http://spacedad.me and told us to figure it out on our own. Apparently only a handful of people have figured it out. I am not smart enough however.

StrangeWizard
StrangeWizard

@Evil_kitten
I've been playing with Heuristic search algorithms, trying to figure out how to pull data from the Cryptocoin market I use to set up alerts on my phone to big changes in price. honestly just tired of having to check that shit manually every 5 minutes.

idontknow
idontknow

@iluvmen

I work in engineering, use it everyday, terrific software

JunkTop
JunkTop

@LuckyDusty
[email protected]

I would like to get into it. Thank you for sharing your stuff :)

haveahappyday
haveahappyday

@TurtleCat
What's RGT?

Gigastrength
Gigastrength

@LuckyDusty
@FastChef
@RavySnake
@Spazyfool
@BinaryMan
@haveahappyday

Could any of you pass this along?
[email protected]

ZeroReborn
ZeroReborn

@Evil_kitten
Late as fuck response, but it's all over. Sentiment analysis on SEC filings, scanning financial reports.

The key is to do this automatically. The firm I work at, because noone can find me here, is Citadel, I'm an intern there right now.

There's a lot of focus on deploying HFT strategies (most of our strategies) in black boxes right next to the exchanges. This why our order gets on the fiber line straight to wallstreet as fast as possible.

Some of our strategies simply rely on picking off bad trades. Some retail guy selling at 4 cents below current ask? Buy all as long as downward momentum is over such and such limit. You see all the extra tiny "vibration" on certain stocks like microsoft? That's us or another big firm (Citadel is far from the biggest) just edging based on momentum models that act on the milisecond level.

Algo trading isn't hard, go on quantopian and download the hundreds of algos people host on there and play around.

If you want to do it professionally it's a different ball game. If you're not from an ivy or getting stats, CS, or math degree from a top school you're wasting your time.

If you are the above I highly recommend this field. Citadel, Bridgewater, KCG, Jump, or Tower Research pay a fucking shitton.

To give you an idea, as an intern I get paid 10k a month plus a housing stipend. Fucking delicious.

As a entry level quant researcher you can expected 110k-140k plus 150%-200% bonus on salary.

Quant traders basically the same base pay with 250%-400% bonus on salary.

Other firms pay a little less, but I know we've lost talent to a few other firms like Tower and a local company called 3Red here in Chicago. Although this is likely because the culture here is fucking cancer and it kills you inside every day

Illusionz
Illusionz

@Evil_kitten
https://drive.google.com/folderview?id=0B1iikX5PwNx4d2dKQ3FTSWVRSDA&usp=sharing

Boy_vs_Girl
Boy_vs_Girl

@LuckyDusty
@CouchChiller
@Gigastrength
@haveahappyday
@BinaryMan

Me as well please.

[email protected]

Carnalpleasure
Carnalpleasure

@LuckyDusty
mind if you post it on lain chans volafile room?
volafile io/r/ kUFzLJ

happy_sad
happy_sad

@LuckyDusty
@LuckyDusty

@CouchChiller

@Gigastrength

@haveahappyday

@BinaryMan

Thank you my dear user!
[email protected]

Emberfire
Emberfire

@BinaryMan
@haveahappyday
@Gigastrength
@CouchChiller
@LuckyDusty
@LuckyDusty
@happy_sad

Anyone manage to get their hands on this?

Crazy_Nice
Crazy_Nice

@viagrandad

Then i "GUESS" il'l just never have to work again.

Ba dum Tshh...

Soft_member
Soft_member

@iluvmen
tfw my uni gives me a full MATLAB license valid for my entire uni enrolment (usually priced at $2000+) complete free of charge

VisualMaster
VisualMaster

@Soft_member
Mine too, glorious, isn't it?

Supergrass
Supergrass

@VisualMaster
Truly grand, indeed.

MPmaster
MPmaster

@LuckyDusty
Please user, much appreciated.
[email protected]

BlogWobbles
BlogWobbles

@Sir_Gallonhead

@askme
here

I've also entertained a system like that. But I'm kind stumped regarding a good source of data for this. Do you use scrapping AF or have you managed to find a good source?

Illusionz
Illusionz

@ZeroReborn
Do you have any tips regarding what skills a CS student should develop in order to get into quant trading?

kizzmybutt
kizzmybutt

@BlogWobbles
Same here. Quaint stuff has always interested me but the gambling has always appealed a bit more. But yeah it's just a shit load of scraping and xpaths. I'm pretty sure I know more about the layout of some sites than their devs because of the amount of scraping. Some sports you can find good databases/api it just depends. I also think sports can be more profitable in a lot of cases vs trading because of the guesswork/gut feeling most people go on. Which if you have a good system built will crush them every time.

Gigastrength
Gigastrength

@Soft_member

Myself as well, except mine was paid for by the US Government. Iraq War vet here, told them I needed more school to get desired civilian career. Did M.Sc. in Applied Mathematics, fully paid for, with housing allowances. They said they'd pay for any books or equipment. Told them I needed a $2,000 laptop and Matlab and about $1,000 in textbooks.

Got to keep all the books and equipment, but now have six-figure data analyst job. Use equipment to do machine learning shit evenings and weekends.

So...thanks, fuckers.

Methnerd
Methnerd

@Fried_Sushi
NN model

Do you have a kickass GPU or some AWS time. You're gunna need that user!

doesn't know about training sets.

Sharpcharm
Sharpcharm

@Emberfire
do you use weka?

@iluvmen
MatLab is good Python has scikit-learn which is great too

I'm a PhD student in biology. I have some machine learning experience in python for genetic questions.

attached is my training set for one classifiers.

Ask me general machine learning questions

TechHater
TechHater

@w8t4u

Are you against double-majoring? That was my route and it had paid off handsomely.

StonedTime
StonedTime

@Gigastrength
That's fucking awesome, living the dream

Evilember
Evilember

@LuckyDusty
Please send this to me as well. Thank you so much, user.

[email protected]

massdebater
massdebater

Glad its over

StonedTime
StonedTime

How good is back testing amongst random dates and profits averaged together?

Methshot
Methshot

@StonedTime
Couldn't tell you specifically but in machine learning stochastic approaches often give very accurate results.

eGremlin
eGremlin

@Evil_kitten
Does anyone use stochastic models or operations research techniques?

Disable AdBlock to view this page

Disable AdBlock to view this page