[ 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: 78 KB, 1024x768, 1510789381764.jpg [View same] [iqdb] [saucenao] [google]
5262826 No.5262826 [Reply] [Original]

> code my own arbitrage bot

> let it run with small amounts

> impresisve results, massive girth

> turn off all safety, this will make me millionaire, no brakes

> let it use full balance

> and my money is gone.

> gone...

> all gone.

WTF, FUCK PYTHON FUCK YOU MOTHER FUCKER; FUCK

WHY THE FUCK DOES a simple calculation 1/1652.0 say 6.150439 !?!?!?

My bot. It calculated the rate of btc/usd to usd/btc as 6.15.

>> No.5262856

Sounds like you fucked up, not python

>> No.5262927

hey really sry for you Loss bro! But dont give up eventually you can get it all back by your arbitrage idea! Btw. could you tell me on which exchange u let it run?

>> No.5262937
File: 6 KB, 754x88, mp[e.png [View same] [iqdb] [saucenao] [google]
5262937

>>5262826
What are you even talking about?

>> No.5263044

If you don't know the intricacies of integer and float mechanics in the language you're programming A FUCKING FINANCIAL BOT in you deserve to lose all your money.

>> No.5263064

Fucking idiot.

>> No.5263087

>>5262937

1/16259.0

Try even 1/17232.0 it has to be in thousands it seems. But, print('{:f}'.format(1/16259.0))

The bug was... json.dumps(1/16259.0) when passing objects to other parts of the system, so its bug in json library, it should not do the scientific notation.

fuck fuck me fuck fuuuuck. FFUCK.

>> No.5263113

>>5262826
>horrible grammar
>horrible greentext
>reddit spacing
>some slag pic
>can't program
You're a failure

>> No.5263117

do you know what a float is? do you know how integer and float division work in high precision environments? also nice larping

>> No.5263158

Sell your bot to someone

>> No.5263192
File: 32 KB, 694x801, Me04jVB.jpg [View same] [iqdb] [saucenao] [google]
5263192

>week's later on OP's resume
>senior level cryptocurrency arbitrage programmer

>> No.5263200

you retards, its not float vs integer "mechanics"

its pythons "pick" scientific notiation over decimal of same float in diffrent libraries

>> No.5263231

>>5263087
Oh okay so you concede it wasn't python's basic arithmetic?

>> No.5263264

>>5263158
so they loose their fortune too
nice

>> No.5263275

Why didn't you create a virtual market to test it?

>> No.5263311

>>5263264
Bizbot: buys high sells low automatically

>> No.5263315

>>5263231

Its pythons problem, it has inconsistencies in default/bundled system libraries.

Do you, expert programmer, know where/how to turn off scientific notations globally, hm? Is that so obvious, that the bug happened because of that and not classic "int vs float"?

>> No.5263353
File: 176 KB, 1080x1080, 1490408977906.jpg [View same] [iqdb] [saucenao] [google]
5263353

Thats why you should study computer SCIENCE and not software engineering.

>> No.5263405

>>5262826
I love when that pic gets posted.. that puffy pussy

>> No.5263434

>>5262826
>ever using ful balance
>ever
i mean, i aint even into biz but that seems kiiinda stupid, you should leave at least some kinda fall back in case of failure

>> No.5263457

>>5263315
Are you actually retarded?

>> No.5263464

>>5262826
Do you always convert to eth before sending to another exchange?

>> No.5263476

>>5263087
Seriously, what are you talking about? If you dump a float via json and load it later it has the same float again. Are you sure that your buy/sell strategy had no errors or unforeseen behaviour?

>> No.5263531

>>5263315
Read up on best coding practices, novice scrub.

>> No.5263587

>>5262826
That’s pretty funny man, even though it sucks. Just code it better next time and make your money back

>> No.5263933

>>5263476

I cant even think man, my money is gone!

it must have been anoteher bug then where I by accident used the float as a string and price[:9] to strip of the excessive decimals

>> No.5264181

>>5263933
I am sure you can't blame it on python being unprecise, I am sorry for your lost money but if you can't handle datatypes you should have practised more and most of all let it run on simulation data, not with your entire stack.
Take it as an expensive lesson to work more accurate and move on.

>> No.5264185

>>5262826
time to learn what a unit test is, friend

>> No.5264581

>>5264181

Well fuck, what does the title say BS7? "today I fucked up".

>> No.5264752

>>5263933
How much did you lose?

>> No.5264772

>>5263044
Hey now wanna explain some of that for me? I'm genuinely curious lol

>> No.5264908

>>5264752

4 BTC worth

>> No.5264976

>>5264908
lmaoooo fucking dumbass

>> No.5265063

>>5264772
Floating point arithmetic in any programming language is a complicated thing to work with. It's why if you read old textbooks or books on computer history, they will always talk with an air of pride about how a language was capable of handling floating point.

Since bits are 0s and 1s, it's very difficult to represent floating point numbers with varying levels of precision. And every programming language has a slightly different implementation on how they handle it. It's the one reason Python is used more commonly in scientific research than C++ or Java. It's designed with precision in mind or at least has the tools to better handle it.

>> No.5265093

HAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA

>> No.5265125

>>5265063
Read
>>5263933

He basically converted the float back from json manually and fucked up

>> No.5265203

And now you know why financial bots are written in specific languages that can be mathematically proven

It's called 'R' or something

>> No.5265216

>>5265063
In my own bot I'm using decimal.Decimal

>> No.5265269

>>5265203
No, not really. You clearly don't know what you're talking about.

Also, R is a joke of a language that is useful only for some statistical modeling tasks and not much else.

>> No.5265411

>>5265125
Oh, I know he already fucked up. I think we are past that point.

>> No.5265440

>>5265411
And just like any other total fuck up, he's unable to admit he is wrong and blames it on the programming language and its libraries

>> No.5265498

>>5265440
Ah sorry, misunderstood your post a little bit and thought you'd talk that float stuff as an explanation what could have been the error.
Yeah I don't know how anyone can let his bot play with 4BTC and not test it thouroughly beforehand.

>> No.5265515
File: 458 KB, 220x268, tenor.gif [View same] [iqdb] [saucenao] [google]
5265515

>>5265203

> mathematically proven language

Nigga, what the fuck are you talking about? DId you take your programming course on dailymail.co.uk?

>> No.5266310

Why didn’t this get caught by the sanity check immediately before the trade call? You know, the one that says “stop dead if this is more than 5% of balance”?

>> No.5266438

>>5262826
ITT: Impatient motherfucker loses it. Adios OP.

>> No.5266485

>>5265515
In Bong language?

>> No.5266521

>>5264908
>4 BTC
Why didn't you start with let's say 0.1 BTC?
Greed much?

>> No.5266631

>>5263192
kekd

>> No.5267088

>>5262937
He managed to save the number in scientific notation, which would write it as 6.15E-4.

>>5262826
How can you be so backwards as to save numbers as strings, OP? Are you literally retarded?

>> No.5267210

>>5267088
This is the first thing you learn in prog 101.

And I haven't been in a prog class since HS

TEXT IS STRING ONLY.

>> No.5267289

Any good API to hook some data and charting?

>> No.5267347

>>5265203

For HFT it's C++, which is still pretty rigorously defined

If you are using python you can use a lot of meme packages that aren't entirely consistent

Sounds like this idiot was treating it like web development and didn't backtest thoroughly, I would let any trading algo cook for at least a month before putting in a large sum of cash

>> No.5267354

>>5263353
who is this semen demon

>> No.5267590

>>5267088
He converted everything to JSON probably because of some data structure, but instead of calling json.loads() he decided to cut out the float from the string and parse it without the E-4

>> No.5267627

If it makes you feel better we are in for quite the bubble pop so you can get in cheap in a couple months.

>> No.5267801

>>5267590
yes, but W H Y would you save numbers as a string / in a string / handle them like a string? youre ASKING for trouble.

>> No.5267843

>>5267801
This. Granted at some point you have to be savvy at string manipulation, you always opt for primitives if you can.

>> No.5267948

>>5263311

Top kek anon

>> No.5267991

How efficient do arbitrage bots get? Like how many percent can I expect from a bot that just compares buy and sell orders on a bunch of different exchanges and sends appropriate amounts of currency around?