Dear diary, today I fucked up

> 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.

Sounds like you fucked up, not python

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?

What are you even talking about?

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.

Fucking idiot.

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.

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

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

Sell your bot to someone

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

you retards, its not float vs integer "mechanics"

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

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

so they loose their fortune too
nice

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

Bizbot: buys high sells low automatically

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"?

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

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

>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

Are you actually retarded?

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

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?

Read up on best coding practices, novice scrub.

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

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

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.

time to learn what a unit test is, friend

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

How much did you lose?

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

4 BTC worth

lmaoooo fucking dumbass

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.

HAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA

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

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

It's called 'R' or something

In my own bot I'm using decimal.Decimal

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.

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

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

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.

> mathematically proven language

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

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”?

ITT: Impatient motherfucker loses it. Adios OP.

In Bong language?

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

kekd

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

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

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.

Any good API to hook some data and charting?

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

who is this semen demon

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

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

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

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

Top kek user

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?