[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/biz/ - Business & Finance


View post   

File: 281 KB, 680x440, 479EDA10-FB99-4F1E-957D-1EDDCD97EB81.jpg [View same] [iqdb] [saucenao] [google]
3787821 No.3787821 [Reply] [Original]

Let’s talk about writing and using trading scripts, whether to automate trading or just identify entry/exit points.

What platforms do you use? Have you had much success? Any good guides? Maybe this will be interesting.

>> No.3787850

>Ruining crypto even more

>> No.3787920

>>3787821
I'm a CS student and have been giving this some thought, I'd be up for working with other Anons in making a bot

>> No.3787929

>>3787821
You didn't mention what products your talking about.

>> No.3787948

>>3787850
Ruining cryptos has always been the aim of this board

>> No.3787990

>>3787850
Honestly I just want to do forex. I don’t think crypto is worth it given how manipulable it is.

>> No.3788020

>>3787990
You can always develope a platform which can be tested and applied to any market. The best trading bots are never a one size fits all its having a system that takes in your own understanding of a given market or commodity

>> No.3788881

>>3788020
Of course. Thing is, I'm aware of a few coding platforms out there that do backtesting against historical data in a fairly out of the box manner. Quantconnect and Quantopian for instance do it, though the former is frustrating and the latter doesn't do forex as far as I can tell.

>> No.3789219

>>3788881
Try cTrader/cAlgo (C#) or Metatrader 4/5 (mql language is similar to C++)

>> No.3789244

There are already many different open source options available if you want to run a bot to trade crypto. The problem I found with all of them is that it's really difficult to actually predict how the markets going to do. The only way I could feasibly CA well-performing bought a louder than being developed would be to use machine learning trained against historical data and even then I still don't see how it would figure out when the real spikes are happening, such as a pump and dump.

>> No.3789373

>>3789244
The way I see it, the role of bots should always be constant monitoring and reaction time never active prediction. It should be able to recognize when a plummet or a moon is happening and get on it right away but the consequence of the boom or plummet should be up to the actual human analyst.

Its like having a dog on a leash, its going to chase stuff for you regardless but you have to be the one to decide how far that leash will go

>> No.3789402

>>3789244
>machine learning trained against historical data and even then I still don't see how it would figure out when the real spikes are happening, such as a pump and dump.

Actually a few years ago, back when "stock tip" spam was a big business, this one guy had an algorithm skim off those pumps because he could attribute the spam to a particular organized crime ring, and knew from historical data plus other spams when they'd start the dump, so it was simple to get out right before it started crashing.

If anything, bots ought to perform great against pump and dump because a proper bot script ought to get out at a profit target rather than letting it ride higher.

Like, I'm sure it's difficult to predict how shit is going to move, but there are lots of rules of thumb out there that ought to get you more ahead in the aggregate.

>>3789219
Yeah I've been looking into Metatrader. It's been a lot of years since I've done anything in C/C++, though it ought not be too hard to pick back up. Python was the last language I coded in regularly, though even that's faded.

>> No.3789437

>>3789373
I think I get what you mean, and yeah, there has to be active monitoring of the script and, for example, backtesting of different constant values to see if they perform better.

>> No.3789825
File: 59 KB, 960x540, swag2.jpg [View same] [iqdb] [saucenao] [google]
3789825

>tfw bot makes me 150 a week without me doing anything

I'll never share anything with you fags though. Cs students aren't nearly creative enough to get a good alglrithm.

>> No.3789845

>>3789825
>150 a week
Pfft

>> No.3789873

>>3789845
I mean that's off a 900 dollar initial investment and it compounds. 9000 dollars would yield 1500 a week.

>> No.3789887

>>3789873
Then why don't you put in 9000?

>> No.3789899

>>3789887
Because I'm poor.

>> No.3789910

>>3789899
Then what happened to your swag?

>> No.3789938
File: 1.62 MB, 240x180, fatdance.gif [View same] [iqdb] [saucenao] [google]
3789938

>>3789899
>>3789899
>picture has multiple macbooks and new $100 bills
>says he's too poor to invest in his own idea
that picture just screams insecurity
L A R P

>> No.3790006
File: 10 KB, 276x270, 1503861614511.jpg [View same] [iqdb] [saucenao] [google]
3790006

>>3789910
Not sure what you mean. I invest other people's money and take 10%. This only gives 50 dollars a day total but it's liveable.
>>3789938
Pic was unrelated. If I was larping I wouldn't admit to being poor. Right now I have to resort to investing other people's money but hopefully that will change soon.

>> No.3790078

>>3790006
So just tell us what your doing...

>> No.3790079

>>3790006
Ok dude whatever, good luck but if you have nothing to add then don't bother posting

>> No.3790105

>>3790079
>>3790078

I mean I could copy paste my code here would that make you happy?

>> No.3790109

>>3789873
So what, 458% per year?

They say someone who claims to have an investment vehicle that does over 10% per year is almost certainly running a ponzi scheme.

>> No.3790141

>>3790109
Then i guess crypto is a ponzi. If you bought neo at 4 you'd have almost 1000%.

>> No.3790147

>>3790105
Yes please share and inform
>>3790109
Don't act like 2x-10k is crazy for crypto..

>> No.3790166

>>3790105
Probably wouldn't be helpful anyway. I'm more curious as to what a good algo looks at. Like just inputting technical indicators and weighting them in some way you've rigorously tested (or using machine learning to figure out weighting)? Computer vision techniques to look for chart patterns? Sentiment analysis on social media?

>> No.3790181

>>3790109
>They say someone who claims to have an investment vehicle that does over 10% per year is almost certainly running a ponzi scheme.

To be fair they just said to retard normies who fall for spam mail

>> No.3790252

>>3790109
My algo trading system did +60% in 2016 and I've already beaten that in 2017. How can it be a ponzi scheme when I am only investing my own money?

>> No.3790300

>>3790252
He's just falling for a dumb boomer meme

>> No.3790344

>>3790252
If you go around trying to sell your algo with those claims, then yes, I would suspect you're running a ponzi scheme or other scam.

>> No.3790405

>>3790344
Algorithms are easily testable though, you could simply run them through a simulation of market history

>> No.3790419

>>3790344

But I'm not trying to sell my algo or to attract investors.

>> No.3790473

>>3790419
Well you should be if its that good

>> No.3790478

>>3790405
By that time the guy is probably gone with your money. Or the algo is tuned to perform on historical data. There are lots of bad people out there.

>>3790419
Good for you.

>> No.3790502

>>3790109
No, someone who is promising over 10% per year to other investors is most likely running a ponzi scheme. That's an important difference.

>> No.3790511

>>3790478
>By that time the guy is probably gone with your money. Or the algo is tuned to perform on historical data. There are lots of bad people out there.

There's easy ways around that, like making them run it through a simulator with an encrypted results string

>> No.3790559

>>3790473
If it's that good he should just be growing his own stack, not diluting his strategy with identical competitors.

>> No.3790568

>>3790559
It depends on scalability. If you had something one of the big banks would want then you damn well want to take their payout for it. Otherwise you'll never match the capital return they can offer before some hoopelhead catches up on you

>> No.3790577

>>3790473
No, investing other people's money adds a stress factor as well as legal issues that I don't need in my life. The only reason I can see for taking on investors is to acquire more investment capital. I don't need anyone else's capital, so there is no utility in changing what I am doing.

>> No.3790587

>>3790577
>No, investing other people's money adds a stress factor as well as legal issues that I don't need in my life.

Grow the fuck up

>> No.3790598

>>3790559
It depends on what you're trading. Coins or low-volume stocks? Then yeah, you can wind up fucking yourself if your trading volume shifts the market.

Doing forex on the major pairs though? I don't think there's any risk of diluting your take because you're taking on other people's money.

>>3790577
>legal issues
At the rates you're claiming you could easily incorporate and retain a proper law firm that handles this shit. Then pay yourself a salary and don't worry about lawsuits.

>> No.3790607

>>3787990
As stupid as it may sound, FX is way more manipulated than cryptos. Trust me.

>> No.3790625

>>3790587
I'm retired, dipshit.

>> No.3790656
File: 103 KB, 450x253, 1484256493089.gif [View same] [iqdb] [saucenao] [google]
3790656

Here's the tl;dr anon

If you "know how" to do it well, you still don't have the infrastructure to do it well i.e. low latency servers and enough devs to make a large system that is actually robust. Have fun with flash crashes making your system go haywire because you didn't put in enough safety constraints.

>> No.3790666

>>3790625
Not an argument, grow some balls

>> No.3790667
File: 22 KB, 401x401, 1484239502269.jpg [View same] [iqdb] [saucenao] [google]
3790667

>>3790405
>what is over-training

You retards need to get into /sci/ a bit more and out of /biz/

>> No.3790668

One of my issues is the exchange request limits. Still trying to figure out a way to get around that shit. I don't feel like getting my IP blacklisted for querying their API too often.

Any ideas?

>> No.3790669

>>3790598
>you could easily incorporate and retain a proper law firm that handles this shit

Why? To what end? I don't want to invest other people's money. I'm perfectly content doing what I am doing.

>> No.3790677

>>3790669
To make money
Holyshit

>> No.3790696

>>3787850
What's to ruined that hasn't already been ruined by a speculator's market run wild?

>> No.3790721

>>3790607
Yeah, I hear that a lot. I think that the capital requirements to significantly manipulate the majors, though (i.e., have to be world-class I-bank or nation states) mean an individual can still do fine with an adequate strategy. Maybe not become a multimillionaire, but at least live comfortably. The problem I have with coin markets is the ease with which they can be induced into panic.

>>3790656
I'm actually not talking about HFT. You don't need to be looking at prices with one-tick, or even one-second resolution to make money algorithmically.

>> No.3790742

>>3790721
>I'm actually not talking about HFT. You don't need to be looking at prices with one-tick, or even one-second resolution to make money algorithmically.

Absolutely, its all very variable and manageable, especially when it comes to how many individual indexes you want to be observing at once

>> No.3790752

>>3790669
Then make a scholarship fund with your profits. Who cares.

>> No.3790753

>>3790677
I'm already making more money than I need. Why complicate things?

>> No.3790796

>>3790753
Why not just live in a dumpster like Diogenes, whatever

>> No.3790805

>>3787920
You can make a bot in bittrex with like 30 lines of code in go. This is the super hacky one I run sometimes:

https://imgur.com/a/V1dnH

took me like 45 minutes as my first ever go project.

>> No.3790812
File: 684 KB, 3334x1982, script.png [View same] [iqdb] [saucenao] [google]
3790812

nice thread op, gonna contribute a couple of things as I dont want to see it die. How about a daily algo trading general? I think the area is incredibly interesting.

Ive been doing this semi-fulltime for the past 8 months now, thinking of diving in fulltime while the going is good. If you view trading as a zero sum game then crypto is in the perfect spot for small algo trading shops right now. Minor in comparison to quant/hft dominated markets like options and derivatives yet large enough to make a killing. Also, the competition is fucking drawing meme charts, once the quants move in it might get really fucking competitive but for now its all good.

Generally you wanna focus on market exploitation. For example with traditional quant analysis, the underlying focus is always spotting market inefficiencies rather than just forecasting and modelling alone. A good example is bot dominated platforms like yobit and coinexchange.io. Ive made some very good money over the past 3 weeks just spotting rubbish pnd coins like elix, rocket, f16, uni and all this shit.

Very simple algo too, not fully automated either just a trading assistant. I basically have a script running that polls both of those exchanges every 5 minutes, tracks exponentially smoothed buy/sell volume and notifies me if shit starts looking weird. After a short manual investigation, I get in early and sell at the top.

>> No.3790824

>>3790805

lol that's awesome anon. thanks for posting actual code.

>> No.3790835

Rolled a Bittrex bot in Unity (can fiddle with the editor on desktop, can run it on mobile).
Nothing fancy; looks for pairs with a slight exponential growth, decent history, which aren't at an all time high, etc etc Draw a line describing where you're happy to take profit (over time) and where you're happy to bail out (over time).
Keeping it simple seems to work, but really it's much less hassle just to invest in a solid coin.

>> No.3790888

>>3790796
When you are young, it is sometimes hard to see that your time is your most valuable asset.

>> No.3790893
File: 78 KB, 1080x1080, 1507398398024.jpg [View same] [iqdb] [saucenao] [google]
3790893

How about you niggers share done actual signals?
Put a 120 period Bollinger band on a 30 minute chart, but a buy order just on the top band after an upper breakout with a not-overbought stochrsi (default settings), check for news for positive sentiment.
Set a stops at 30% gain or until the candle return to the band

>> No.3790906

>>3790888
I've higher priorities than being some old sponge touching himself waiting to die. I'll die at 34 if I need to for them

>> No.3790919

>>3790906
Did your mother drop you on your head when you were a baby? You're really dense.

>> No.3790928

>>3790812
How often are you fetching those markets/order books?

Like i said in an earlier post one of my issues is querying their API too often and getting shut out, dunno how to deal with that.

>> No.3790934

>>3790919
Yeah whatever bud, enjoying your fleeting "time"

>> No.3790935 [DELETED] 
File: 345 KB, 2000x1125, nb3ghsP.jpg [View same] [iqdb] [saucenao] [google]
3790935

Join Pump and Trump for the latest signals on pumps, then you won't have to bother with this bullshit.

T.me/pumpandtrump

>> No.3790950
File: 184 KB, 1666x996, bitbot.png [View same] [iqdb] [saucenao] [google]
3790950

Fucking mess, but when sorted you can (maybe?) see for example that most of bittrex is on a bit of a decline right now. Except ARK, which is shit anyway.

>> No.3790971

>>3790934
Nobody gets out alive, and you don't get to take the money with you when you go. Why are you so irritated that I have already made my living?

>> No.3790980

>>3790812
now the example above really just works in very specific conditions and against a certain type of strategy (pump and dump here). When designing something more general it is important to first understand what it is you are actually trying to do.

Financial time series data has certain well understood properties, for example it is non-linear and non-stationary, it can be modelled by markov chain processes, important second order properties are volatility and its tendency to cluster (heteroskedasticity), mean reversion tends to happen in almost all markets, etc.

If one were to focus on plain time series analysis as the underlying entry/exit strategy for the bot then one would take some of these properties (in this case volatility and all of its related properties like clustering) and apply a model that takes this into account. For example one might start with a simple GARCH model and go from there.

The point is, it is important to understand what it is you are trying to do before actually trying to do it. Applying time series models makes sense because if you can induce stationarity in non-stationary data that means youve explained away significant statistical peaks in the time series and can now make predictions.

And this is just one approach obviously. Quants tend to focus on volatility modelling, CS people just put some kind of deep neural network combo like a CNN+LSTM ensemble on top, etc.

>> No.3790999

>>3790971
Because its degenerate and unChristian, a man should give it his all to the last

>> No.3791003

>>3790928
Every 5 minutes, I do run it over multiple proxies though. yobit gives no fucks, you can hit it up every second if you want lol but coinexchange is a pain in the ass with this.

>> No.3791138

>>3790999
I see. It will really piss you off to learn that at this point I only have to spend about 15 minutes a day maintaining my system. The rest of my day is generally spent doing whatever the fuck I please. Life is good.

>> No.3791405

I think the crypto market tends towards chaos no machine learning would be useless. That said I write scripts to help me trade rather than decide to trade for me. Written scripts in python for alerts on various parameters (ie volume, price etc) from Bittrex. The holy grail for me is making a small app on my phone for selling off percentages of my coins as they hit those peaks. I guess I would need a mobile app to communicate with a script running in aws that interfaces with bittrex. I find it really easy to judge these swells in price when looking at blockfolio.

Also toyed with the idea of a deadmans switch when with one click of a button you cash out all your alts to BTC and its sends its straight your BitPay account.

Could be used also for when BTC does those big dips and you want to exit all your Alts for a shortperiod of time and then buy back all those alts again when it hits a bottom. I could only ever judge this myself by glancing at charts (which i fucking do all the time anyway). Id be too afraid to test this automatically. That said you could build in some variables with support values etc but you would have to manually do the donkey work here.

Would be pretty cool to have a Biz repo of python scripts etc.

>> No.3791437

>>3790812
Good man Anon. Sounds tight.

>> No.3791471

>>3790812

Sounds awesome. How can I get access to your script?

>> No.3791793

>>3791471
.25 btc and I'll send it to anyone willing to pay. Laptop died and had to change to desktop, sorry

>> No.3791939

>>3791793
gtfo out of here lol

>>3791471
Its not for sale I'm afraid anon. However, if you want something similar look into something called cryptoping (I believe), they send you entry signals and as far as I got use buy volume as an indicator. No smoothing is applied so its probably very noise, but for identifying pnds it should be enough.

>> No.3792094

>>3790950
bro. fucking nice. i use unity for my bot too. how did you make that graph? thats the only thing ive no clue on how to do.

>> No.3792119

>>3791939
Biz is my shitting Street...

Superpower by 2020.

Have you considered working with market indices in actual markets??Implications on the Dow with trumps tax cuts and major first and second World issues such as the australian debt crisis would make a lot.
Australian crude reserves are also at a all time low, with not enough suppply to keep the country going( 34 out of the recommend 45 days).
Even oil volatility can make money with leverage .

>> No.3792294

>>3792119
Yeah, honestly if you've got the ability to code something to parse report text or mine data from news sources you could conceivably destroy the commodities market. I used to be able to code that kind of shit, like nearly a decade ago. Fucking sucks when skills erode.

>> No.3792354

>>3790667
Isn't over-training a problem only with machine learning? He didn't specify he was using ML.

>> No.3792374

>>3792354
>Isn't over-training a problem only with machine learning?

No not at all, it only becomes exponentially more common with ML

>> No.3792418

>>3791939
Buy volume on an short ema for smoothness? That's it?
Shitty that it can't be backtested, but thanks bro

>> No.3792552

>>3792354
I'd call it "overfitting" or "overtuning" when talking about rule-based strategies. Just because configuration A outperforms configuration B on your test data doesn't mean configuration A is generally better.

In fact, if you could configure a rule based strategy to perfectly exploit every opportunity across your test data, it'd probably fail horribly on other data.

I think when configuring an algo it'd pay to use the same strategies they use for ML: Break your test data into ten segments, do your tuning with nine of them until you're satisfied, and then run it on the tenth. Then rotate the segments and retune. At least that's what we used to do when we'd train classifier algorithms back in college. Also get familiar with the statistics for evaluating algorithm success: accuracy is only one. We used precision, recall, and f-measure. I'm not sure how applicable they are to financial algorithms but they were invaluable in producing a useful classifier algorithm.

>> No.3792792

>>3792552
That makes more sense.
I haven't heard about cross-validation used out of machine learning.
People say the market is too unpredictable to use machine learning but if there's anything i know is that there have been a lot of uses "discovered" by chance.
If ML were to work to predict price changes it would have to take into account news and social media.
I watched Hypernormalisation by adam curtis last week and I was wondering if anyone knows about the aladdin platform and how it works.

>> No.3792879

>>3792294
>>3792119
Honestly, you are dreaming here...
This type of linear stuff will be annihilated in a "real" competitive setting. Especially, anything relying on sentiment analysis or any type of NLP applied to public sources. First off all youll never be able to match firms trading on closed information unavailable to you, second, it will be trivial to pick up your bots pattern and pretty foolish of any serious player not to do so.

>> No.3793005

>>3792792
>>3792552
Machine learning is used on financial data right now. Its been used in finance since decision trees became a thing. People just think of neural networks when they think about machine learning, but thats not all.

The overfitting problem is present in any non-linear approach. It just means your algorithm is not generalising well enough. Specifically, with time series data, it means the statistical peaks it identifies are only local rather than general.

Non-linear methods are also very hard to explain in reverse, which makes them somewhat unattractive in finance. You dont want to rely on a blackbox when handling money.

All of this said, machine learning is absolutely used. From various ensemble methods (like extreme random forests), to svns to even more experimental stuff like reinforcement learning/q-learning agents.

One of my own algorithms uses random forests with engineered indicators to make market movement predictions. It just comes with its own can of warms as I said. For one, its not as easy to validate this type of model mathematically when compared to volatility prediction. Extra care has to be taken with avoiding various biases that might lead to overfitting or other problems (lookahead bias, selection bias, etc). More testing is involved in general.

I prefer linear methods myself but sometimes a linear method cannot capture all of the information successfully.

>> No.3793072

>>3792879

Yeah, you're probably right. Still, there ought to be enough left there to make some money. Honestly I'm just thinking about what I can do with where my skills were. Or at least somehow linking things back to my old skillset.

>> No.3793120

>>3792792
Also, I don't know about "aladdin", but if you are looking for a purely quant/algo based fund look into renaissance technologies. I can even tell you what it is they are doing in principle, but remember, predicting and forecasting is only half of the game (not even that).

If you go on arhivx and search for time series related research, all the algos are there for you. If you are comfortable with linear algebra and applied multivariate calculus you should be able to replicate any results published. State of the art is something in the 70%-80% range right now, and that still wont make a winning bot...

>> No.3793133

>>3787990
>manipulable
>but giving money to an fx dealer
kek

>> No.3793147

>>3793120
>If you are comfortable with linear algebra and applied multivariate calculus you should be able to replicate any results published.

Well fuck.

Any suggestions on how to get comfortable with that when you're more than a decade out of undergrad?

>> No.3793190

>>3793072
Focus on crypto.
If you had those skills once youll get them back up in no time. The advantage is, no serious firms are involved. I bet even NLP stuff on crypto will work really well. And if you combine it with some other stuff you are probably half way there already.
Like for example traditional TA as in lines-crossing-other-lines rarely is any better than buy-and-hold when it comes to stocks. But here, combined with sentiment analysis and some kind of risk assessment model like hidden markov states it would probably work rather well.

>> No.3793286

>>3793147
That came off unnecessary complicated sounding on my part, sorry. Wasnt intended this way. I only mentioned arxiv because you can find most of the cutting edge stuff on there and linalg and multivariate calculus is all you need, which in comparison to more abstract math is still very accessible. So any hedge fund employing 100 phds is already ahead of you when it comes to securities pricing, derivatives, etc.

If you are asking how you can become comfortable with the math its not really that hard if you are willing to put in some work. I can write up a few suggestions if you want.

>> No.3793419

>>3793286
>If you are asking how you can become comfortable with the math its not really that hard if you are willing to put in some work. I can write up a few suggestions if you want.
Another anon here, but really interested in your suggestions.

>> No.3793583
File: 1021 KB, 500x281, source.gif [View same] [iqdb] [saucenao] [google]
3793583

>>3793133
forex brokers, cfd brokers for example, do not 'manipulate' markets it's impossible.

banks such as goldman and citi however usded to clip their clients out as you can see where their stops are. that's if your trading lower market cap stuff with larger sums

>> No.3793735

>>3793286
>If you are asking how you can become comfortable with the math its not really that hard if you are willing to put in some work. I can write up a few suggestions if you want.

Well I was thinking if you could recommend some readings, recognized texts, stuff I can work through on my own rather than “You need to go take a class.”

Like I get the thing with math is to read the principles and practice it over and over through problems. I’m not so old I’ve forgotten that. But it’d be nice to have a roadmap, so to speak, of the topics that need to be covered.

>> No.3793996

>>3793419
Alright, I'm gonna assume no hard math knowledge. The obvious stuff first:
> Statistics
I'm not gonna state the obvious reasons why this is necessary, but when you are doing model selection, validation, etc you need to understand what the results are actually telling you. "All of Statistics" by Wasserman covers pretty much everything.
> Calculus
Surprisingly little calculus is actually involved. And unless you are really interested in the math or you are doing heavy derivatives work, you really only need to understand this conceptually. "Calculus Made Easy" by Thompson will get you there. Over 100 years old, doesn't really touch on limits, but its probably the best book written about the nature of calculus.
> Linear algebra
Now this you really need to know very, very well if you are planning on doing any ML work. Traditional finance too will involve a ton of matrix operations, etc. Also youll need this to comfortably read published research. Pick up "Linear Algebra" by Lang, an amazing first introduction.

Now those three out of the way and you can focus on more applied stuff.

> Time series analysis
In other words dealing with data that is presumably temporally correlated. Specifically applied to finance youll be dealing with temporal effects on volatility, its clustering, etc. Most of TA is a simplified version of time series analysis in some form or another. The objective is always the removal of correlation in a given series of data, which allows you to treat it as a stationary object, hence make forecasts. Look into "Time Series Analysis and Its Applications" by Stoffer.

This is getting a bit long now lol, gonna continue in another post

>> No.3794146

>>3791138
you know yourself that thats the point where you want to be, not where you are right now.

>> No.3794321

>>3793996
This is good shit, mathanon. You are a gentleman and a scholar.

>> No.3794373

>>3793583
you literally trade their quote. they don't 'manipulate' the market, they are the market.

>> No.3794400

reminder, you are not gonna make it.

>> No.3794414

>>3793996
>shilling undergrad textbooks on biz

I really like your style

>> No.3794987

>>3794414
That shit will moon my friend, any time now. Undergrad math text books are a gem in a sea or shit.

>>3794321
>>3793996
continuing
Another point on time series analysis and modelling in general. If you deconstruct this further, beyond just trying to understand non-stationarity, mathematically you are trying to uncover the generative process behind the time series. As in, there are some variables causing spikes, lows, highs, etc. the latent variables responsible for making a plain Gaussian process look like financial data, thats what you are interested in uncovering. And thats what modelling is in fundamentally.
> Probability theory
This is unsurprisingly a massive field in math and probably worthless just applied by itself. However, you should know the basics as they are needed for subsequent fields I'm going to list here. So if I ask you "Whats the probability of A given B has occurred" you should know the equation. You should know what a distribution is, etc. I think in this case khanacademy is probably best, they cover the basics fairly well.
> Bayesian statistics
Math wise this is very complex. Fortunately enough, the math can be skipped without missing out much as long as you understand whats going on. Bayesian statistics deals with the probability of events given knowledge of some data. So "What is the probability of A given data vector X". This has a huge range of applications in finance, for example the famous stochastic volatility model can be fully expressed in bayesian terms. Python has a great package called pymc3 for bayesian inference, which does all the math for you. Go to their github and look for learning resources, the very first book suggested is a great, free introduction to bayesian methods.

>> No.3795237

>>3794987
> Control theory
Linear and dynamic systems control is usually studied in engineering, but can be applied to finance, since again, math is general. Here you are interested in stabilising some state variables and once again the objective is explaining away peaks, shocks, etc. Of course this is usually applied to volatility in finance. "Modern Control Engineering" will give you a good overview.
> State space theory
You can view this one as being closely related to control theory. time series analysis as well as bayesian statistics. This is the study of system states and their transforms. State space modelling is trying to infer information about a given state (again, for example volatility), given some observations and crucially adjust these conclusions as new information arrives. The Kalman Filter is probably the most famous example of this. The books here are unfortunately somewhat theory heavy, google Kalman Filter and see if you can find a book explaining the process, go from there.
> Markov processes
Def check out the wiki first as this will be quite a fucking writeup trying to explain this here. Generally speaking this would fall into probability theory and can be viewed as a discrete state space process. Markov chains are used to model all kinds of stochastic processes. All kinds of ML related shit can be viewed as a markov process in some form. In finance, hidden state markov models can be used to detect pumps and dumps, spikes in volatility, regime changes, etc. Look for Norris's "Markov Chains"

>> No.3795385

>>3795237
>>3794987
ok bus is any of this shit necessary to write a simple linear strategy?

>> No.3795429

>>3790473
no he shouldn't.. pretty much anyone trying to sell an algo/trading system is a con artist

if you have an edge then the best thing to do invariably is to exploit it (ideally using your own money - but fairly easy to find funding if you've got a track record from a legit broker - ergo bitcoin and trading via FX bucket shops is not as much use whereas trading futures or cash equities intraday and demonstrating consistency over 6 months to a year will open plenty of doors for $$$)

>> No.3795480

>>3795385
Its not. You do need statistics and time series analysis though. You need to establish an asset can be exploited linearly (for example mean reversion is possible) or engineer some form of exploitable linearity (mean reversion through trading cointegrated pairs) before doing any of this shit. If it isnt then you are just engaging in mental masturbation.

>> No.3795482

>>3795385
Simple linears strategies will not make you any money on long run if ever.

>> No.3795536

>>3795385
he's a student who's bullshitting you for the most part. eg:

>control theory

It can refer to something as simple as turning a hot plate on and off, from the input of a device acting as a thermometer.

>> No.3795573

>>3790980
CS people just put some kind of deep neural network combo like a CNN+LSTM ensemble on top, etc.

you're throwing around terms you're not quite familiar with, CNN would be useless for this, you mean RNN + LSTM. Though this is generally not too great and requires rather a lot of data.

Simpler methods tend to work best though researchers in most CTAs are still exploring various things from ML. The way it is being applied at the moment isn't how you'd expect... as far as the financial time series data is concerned the old systems are still applied and tweaked as needed. ML is more often used at the periphery when dealing with say unique data sets. There has also been strong interest in NLP for a while too and that is where you're more likely to find RNN + LSTM actually used in production and not just played around with.

>> No.3795605

>>3795536
lol man alright. I did mention "no hard math". So im trying to explain it as best as I can without going into a ton of details. What do you disagree with specifically? Calculus is rooted in mechanics for example doesnt mean its got no application in finance.

>> No.3795660

>>3795605
how about the fact that no one is actually communicating in symbolic math, even in finance

try this, design a problem that's A. hard to solve symbolically but B. easy to solve with simulation

now show me another, opposing example and i'll be impressed with your shilling otherwise fuck off you normie faggot cuck

>> No.3795692

>>3795573
Nah man, Im very familiar with what I'm talking about. CNN+LSTM is not useless at all. Why would it be? LSTM is just a form of an RNN, so what do you mean? A recursive network on top of an LSTM? I bet you are thinking of computer vision when I mention CNN, but 1D convolution and pooling can be applied to other data to extract features and then feed them to an LSTM network.

>> No.3795723

>>3794146
For the system we are discussing, yes, about 15 minutes a day to manage it as long as nothing breaks. Nothing usually breaks. The system doesn't need me to identify opportunities. The system doesn't need me to execute trades. I'm not going to apologize for having the background that allowed me to envision and build such a system. I don't think I've done anything magical, but I have worked hard on this system and it seems to work very well as evidenced by my returns.

>> No.3795777

>>3795660
Wtf are you even on about?
Are you thinking about those fucking block diagrams or what? How are you gonna represent portfolio optimisation, options pricing, etc but as an optimal control problem. Optimal control is at the heart of financial math you fucking retard.

>> No.3795821

>>3795692
fair enough, I'm not just thinking of machine vision applications but i've never heard of them being used seriously with say tick data, especially not in real time

>> No.3795873

>>3795723
how complex is your system? Hundreds of indicators like cryptoping?

>> No.3795887

>>3787990
forex is manipulated by states to create stability so economies don't collapse

>> No.3795911

>>3795821
Oh right got you. Yeah its perfectly useless applied to time series data. From my point of view. Doesn't prevent CS people from trying to make it work lol. Youd be hard pressed to find actual production use of RNNs in the field. I meant to say that CS people in general tend to solve shit by just dropping some form of deep neural net on top and hoping things work out. I can give you numerous examples of startups trying to apply LSTMs to financial data right now.

>> No.3795927

>>3795777
>masturbatory talk about asset pricing models

you're either retarded or you intentionally derailed the thread

>> No.3796002

>>3795927
You are just projecting honey.
Ill make it simple for you, say you are constructing a portfolio of shitcoins, you have some idea about the risk associated with every coin as well as some kind of estimation of returns. You are given X amount of $. Changing your allocations at any given time step has a cost. How do you call this kind of problem? Now do yourself a favour, google Control theory in finance and stop embarrassing yourself.

>> No.3796039

>>3795873
I don't know what cryptoping is. But, yes, for the ml work we're talking about here I use a high-dimensional dataset.

>> No.3796099

>>3787821
What languages should I be looking into to write such scripts?
I guess u gotta work with your brokers api?

>> No.3796118

>>3796002
>irrelevant example that would never work without a metamodel

kek

>> No.3796177

>>3796118
So you really think portfolio optimisation is irrelevant to finance? Showing your true brain power there m80.
also lol nice one, we went from "nobody talks symbolic maths in finance cause I think control theory is just some block diagrams" to "I run my models without doing portfolio optimisation and so I stay poor forever and ever and ever". Continue on this path friend, the more of you the merrier.

>> No.3796244

>>3796099
For contacting the broker, executing orders, etc really any language would work. The APIs are usually really simple and if they dont provide a library for your language of choice you can easily wrap their socket/http api yourself. I'd go with python personally for simple stuff.

>> No.3796289

This is probably the best /biz/ thread ever.

>> No.3796341

>>3796177
sorry but if deciding between rebalancing a portfolio 100 or 200 times a year determines your success in crypto, you've fucked up somewhere. if your talking about stocks, you're already cucked by vanguard&co

the market will not buy your nigger student autism

>> No.3796529

>>3796341
> I guess you could use it but you are just a nigger cuck
/pol everybody.
my success in crypto is irrelevant here. Whats hilarious is you backing yourself into a corner with your retard symbolic maths statement lol.
All that needs to be said here. Go ahead and read this paper
> https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2504061

of course you gonna cry that this is not applicable to crypto but obviously you are brainlet anon and you gotta cope somehow

>> No.3796566

>>3796529
>210 pages
Fuck, I thought legal scholarship had the market cornered on journal articles that long.

>> No.3796588

>>3796566

Oh wait, it's a thesis. I'm not used to seeing those on SSRN in my field. 210 pages is probably average.

>> No.3796599

>>3796529
>literally a new phd

please stop i can't handle any more kek

>> No.3796657

>>3787821
there is an algorithm or a type of algorithm that works to make money. its used by institutions. basically it detects how many people are long or short a stock. whenever there is a majority on one side, the algorithm will try to push the price the other side to force all those people out and collect the price difference.

thats not something retail investors can do. you need millions/billions to make it work. plus you dont have level 3.

theres no advantage to using any algorithms for retail investors. think about it. if someone made an algorithm to have a 99.9999% chance of winning in the long run, would he really sell it to you for a few hundred/thousand bucks? every trade would make him exponentially bigger income, and he would quickly become extremely rich.

there are strategies to win in the market. however they are by no means easy to find. there are many patterns, and only a few actually has appropriate risk:reward long term. even if you know that strategy, you'll likely still be 90% of people who lose, because you dont know how extremely difficult it is to discipline, fomo, being patient, sticking to plan, etc.

>> No.3796732

>>3796599
Well heres some news for you, these are the people you gonna be trading against if crypto ever gets real. And here you are unable to grasp that simple example of portfolio optimisation (also, rebalancing wasnt even the point lol). Here's another one for you, say you identified a mean reverting pair and are now trying to find the optimal position for the pair at any time point t. How do you solve this?

>> No.3796843

Can anyone reccomend a few books on algorithmic trading?

Preferrably heavier on the programming and application side than the mathematics and statitics (I already have a bsc and msc in math, but dont know where to start with trading)

>> No.3796866

>>3796843
Look into "Algo Trading, winning strategies" by e.p. chan, very light on math goes into application pretty much right away.

>> No.3796904

long period trading (days to weeks): sentiment analysis of 4chan posts if a specific ticket is mentioned using a CNN, output of that CNN along with median price history is input to next CNN + LSTM
Short period trading (30 min to 1h): Markov process based on full filled buy/sell orders AND price. Find out which process to use on your own :^)

first method works much better, thank me later faggots. Made bank off this already

>> No.3796981
File: 64 KB, 1399x1024, output_34_0.png [View same] [iqdb] [saucenao] [google]
3796981

Anyone want cool visualizations?

>> No.3797246
File: 129 KB, 500x385, bleh.gif [View same] [iqdb] [saucenao] [google]
3797246

>>3794373
no, a cfd broker is not the "market" lol. they quote whatever they want, usually very precise. manipulating price action on forex 2trillion usd daily is a completely another thing from clipping stops. usually it's impossible to get clipped at forex unless a completely clueless trader enters, that is not the case for cryptos for example as have seen eth flash crashes of 99%

>> No.3797311
File: 312 KB, 601x595, 1446515535418.png [View same] [iqdb] [saucenao] [google]
3797311

>>3793005
This is why I have my doubts on most bot algorithms. I suppose anyone who has a good system in place isn't going to advertise it (if you see an advertisement to signup for a bitcoin botting service, probably a scam). I've had a bot installed for a while but haven't really fine tuned the algorithm, and always just paper trade run it.

>> No.3797312

>>3796732
>muh decision boundaries
I'm out of crypto trading the second it requires any real effort. especially if that effort is reimplementing some wheel, something that you seem to cherish a lot.

by the way if trading on a dex ever becomes the norm, the lag from chain transactions alone will make it a new paradigm for automated trading, no one is going to smugly walk in and plug in their algorithms.

>> No.3797344

>>3787821

Algorithmic trading is useless with Crypto, you have institutional investors that dump at the smallest sign of risk and then you have the whales that exploit the small fishes and then dump when they have filled their bags.

Then you have the little guys like you and me that would do anything shameless to get a buck.

>> No.3797359

>>3789825

That is such bullshit.

Stop taking money out of your mommies account and trade like a real man.

>> No.3797368

>>3789825
>meme money and nigger computer

>> No.3797372

>>3790812

are there any legal repercussions to employing this method?

Seems pretty fucking shady to me bro.

>> No.3797442

>>3797372
I don't think so. I don't do securities law, but my understanding is that it's the manipulation of the price that's unlawful, not incidentally profiting from it.

From a legal perspective, honestly, you don't *want* to criminalize that. It'd stymie free participation in the markets because you'd probably have to keep a significant amount of your profits from all your day-to-day trading segregated or held in reserve for months if not years in case a clawback order came down. Plus it'd render the participation in the markets much riskier and require substantial more due diligence before entering any position.

>> No.3797505

>>3797312
what fucking wheel dude lol this is the most basic stuff there is. Literally couple of lines of code if you know what you are doing. For some fucking unknown reason you decided to make your grand stand on that one point when all you had to do is google stochastic control theory and stochastic calculus and look at all of the fucking examples as applied to finance. You probably think you are really profound with that lag from decentralisation comment too. my fucking days you make me laugh

>> No.3797551

>>3797372
I see nothing shady about what anon was describing. He's not manipulating a market, he is just making clever trades with publicly available data. Some folks like to worship their 2-d charts, others find more interesting ways of looking at the data. If it is illegal to use mathematics to identify and exploit patterns in data for financial gain, I just quit.

>> No.3797569

>>3797505
>muh matflab
>muh pyshit

so you don't really know how to code either

>> No.3797617

>>3797372
just using publicly available information polled through their official API seems pretty legal to me

>> No.3797707

Alright anons, I'm headed to sleep. We should do a daily AT general tomorrow if this one archives in the meantime. I found this extremely productive.

>> No.3797788

You used to be able to triangle arb on Bittrex but now so many people are doing it so you're fighting for scraps

You can also cash & carry ETHZ17 on Bitmex for like guaranteed 10%

>> No.3797984

Based on >>3790812 and subsequent posts, it's clear this anon knows what he's saying. Also >>3796904 sounds doable and I'd wager he's legit too, which is cool to see. I'm intrigued by the approach of >>3790835 and >>3790950 and would like to see more homebrew visualizations, scripts, and ideas from anons

I just started getting into pymc3, doing the probabilistic programming for hackers book, and it is not hard to understand. Actually, it's like fucking magic, so I'm very excited to try to apply this stuff. My background is in machine learning and reinforcement learning already, though modeling time series is a bit new to me. Training an agent to learn a policy, solving multi-armed bandits, etc., all that I get... yet for crypto (which I haven't been in for too long), reasoning about volatility seems more critical.

Anyway, great discussions here. Hopefully we can keep these threads going and have our own little cottage industry of algo traders.

>> No.3798028

Anyone have a GitHub with some examples? I know it’s not going to be a winning formula but getting in the right mindset would help

>> No.3798220

>>3797984
nice anon. I think that books goes over a stochastic volatility model, which is kinda the go to example of bayesian inference for financial data. Try reimplementing linear models too, like ARMA, ARIMA, ARIMA+GARCH, etc. Look into edward if you havent arleady, another cool bayesian inference library. I really think probabilistic programming in general is fucking perfect for this type of stuff. Working with distributions rather than concrete scalars just seems obvious when dealing with uncertainty.

Also hierarchical modelling is where bayesian approaches really begin to shine. I'm currently testing a couple of things, trying to identify moon coins from coinmarketcap data.

Ive actually been toying with reinforcement learning too, nothing concrete so far as ML is not really my background. Have you had much success applying agent/policy approaches to this type of stuff?

>> No.3798262

>>3798028
Look for various backtesting platforms like mhallsmoore/qstrader or mementum/backtrader and all the others. They usually come with some toy examples that will help you get started.

>> No.3798682

>>3796657
you've got absolutely no clue what you're talking about

>> No.3798749

>>3798220
>Ive actually been toying with reinforcement learning too

if you've not already seen these then this half module from UCL gives a good introduction:

http://www0.cs.ucl.ac.uk/staff/d.silver/web/Teaching.html

>> No.3799090

>>3798682
neither do you or anyone else here. if you were a profitable trader right now you wouldn't be talking to fuckwits on 4chan.

to make an algorithm you first need a strategy that actually produces a net profit long term. everyone says they know that strategy, but its all hindsight and they still end up being the 90% losers. having an algorithm or not to carry out that strategy doesn't matter because you most likely would not be working a 9-5 job besides trading as a profitable trader

>> No.3799196

>>3799090
Fuck off tripfag.

>> No.3799279

>>3799090
>you first need a strategy that actually produces a net profit long term

no you don't, nothing wrong with generating short term alpha so long as you recognise when the strategy starts to fail/is no longer applicable

if you're only searching for long term strategies then you might well be more prone to failure - the market adapts as you and others exploit edges, you need to be able to adapt too

>> No.3799586

Where are you guys getting the data to backtest?

>> No.3799932

>>3799586
depends what you're trading

for futures CQC has been OK

>> No.3799945

>>3799932
FFS

*CQG

>> No.3799957
File: 72 KB, 1280x720, maxresdefault.jpg [View same] [iqdb] [saucenao] [google]
3799957