Pages:
Author

Topic: [ANN] MarginBot - A Bitfinex Margin Lending Management Bot - page 13. (Read 45953 times)

full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
You're not going to see this until it's too late, but for reference... just watched you go down a list hand-editing a whole series of formulae from "=adjacent cell * 50000" to "=adjacent cell * H3"

Easier method: enter "=adjacent cell * $H$3" into one cell, then copy/paste or click and drag the little black square handle in the corner to duplicate. The dollar signs make it an absolute cell reference that won't change when you copy it, whereas the 'adjacent cell' reference is still relative and will change.

heh, you're right, it was too late...  i knew there was a way to do it, but couldn't remember how.  I hate excel....
full member
Activity: 136
Merit: 100
You're not going to see this until it's too late, but for reference... just watched you go down a list hand-editing a whole series of formulae from "=adjacent cell * 50000" to "=adjacent cell * H3"

Easier method: enter "=adjacent cell * $H$3" into one cell, then copy/paste or click and drag the little black square handle in the corner to duplicate. The dollar signs make it an absolute cell reference that won't change when you copy it, whereas the 'adjacent cell' reference is still relative and will change.
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
Cool, for my own amusement, i'm going to add all these numbers into an excel file if you don't mind.  Looks like on an average day the bot out performs you by a tiny amount like you said, but you occasionally seem to have a much better day, which probably makes it pretty close to a wash, but i'd like to see the exact difference in a spreadsheet.

No objection to the spreadsheet thing. If you want more numbers I have almost a year of 'em.

Actually, I made it a google sheet, so anyone can play with it or throw their own numbers into it:

https://docs.google.com/spreadsheets/d/1NRZdcKrZTq0KLnIKs6tI0qAuNTXckldL1CMtDf72oek/edit?usp=sharing

full member
Activity: 136
Merit: 100
Cool, for my own amusement, i'm going to add all these numbers into an excel file if you don't mind.  Looks like on an average day the bot out performs you by a tiny amount like you said, but you occasionally seem to have a much better day, which probably makes it pretty close to a wash, but i'd like to see the exact difference in a spreadsheet.

No objection to the spreadsheet thing. If you want more numbers I have almost a year of 'em.
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
Cool, for my own amusement, i'm going to add all these numbers into an excel file if you don't mind.  Looks like on an average day the bot out performs you by a tiny amount like you said, but you occasionally seem to have a much better day, which probably makes it pretty close to a wash, but i'd like to see the exact difference in a spreadsheet.
full member
Activity: 136
Merit: 100
I think I have these in the right order and on the right days. Somehow doesn't look quite the same as when I was comparing it earlier but anyway...

Code:
Date		MarginBot Returns	 noggin-scratcher Return
10/31/2014 0.0727% 0.0677%
11/1/2014 0.0701% 0.0630%
11/2/2014 0.0715% 0.0672%
11/3/2014 0.0706% 0.0665%
11/4/2014 0.0699% 0.0662%
11/5/2014 0.0667% 0.0640%
11/6/2014 0.0651% 0.0639%
11/7/2014 0.0652% 0.0605%
11/8/2014 0.0615% 0.0595%
11/9/2014 0.0598% 0.0568%
11/10/2014 0.0589% 0.0597%
11/11/2014 0.0582% 0.0590%
11/12/2014 0.0577% 0.0590%
11/13/2014 0.0764% 0.0996%
11/14/2014 0.0891% 0.0983%
11/15/2014 0.0751% 0.0634%
11/16/2014 0.0689% 0.0674%
11/17/2014 0.0727% 0.0690%
11/18/2014 0.0713% 0.0708%
11/19/2014 0.0701% 0.0719%
11/20/2014 0.0691% 0.0725%

Ah, have located the difference between now and earlier; was previously using the 5 d.p. numbers quoted higher up the thread, which appear to have mostly rounded up slightly when cut down to 3 d.p. -- using the more detailed figures for MarginBot, and my actual start/end balance, I make the overall percentages +1.45037% for the bot and +1.43566% for my efforts. Which if I've done the right calculations would be 28.438% and 28.115% if extended over the course of a full year.

End conclusion: I'm spending a lot of time on not quite keeping up with a surprisingly simple algorithm. I should probably get a bot.
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
Oh, sorry, for some reason I got out of order there a bit and was thinking Sukrim's numbers were yours. : Smiley  Yeah, I'd love to see your numbers as well, out of curiosity...

I have to imagine if you micromanage your lends you can probably outperform just about any bot out there, but I only have so much time, and can't devote a ton of time to lending just to make a few pennies a day more, so for my needs the bot works pretty well.  I would love to see how it stacks up to a closely managed account though.
full member
Activity: 136
Merit: 100
Comparing bot to FRR, sure, small differences add up. But I'm not FRR-ing it up, which puts me pretty much in line with the bot... give me a minute and I'll round up some actual numbers.


full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
Well consider me taken by surprise... I wasn't expecting it but, if I have the alignment of days right, your bot is outperforming my manual swap-managing. Not 100% of the time and not by very much, but for a majority of the days listed.

That said, it looks like I make up most of the difference by reacting better for those 2 days when the rates spiked - looking at the overall percentage increase across the full period, it's... well that's very slightly in the bot's favour too, but I think it's close enough to call it a wash, and suggests that if rates ever spiked for longer I might pull ahead.

Still, further evidence for the proposition that idle funds is the main thing to avoid.

Actually, if you apply the differences to any significant amount of money, its not a small difference....

Lets say a $50,000 balance (and this doesn't include daily compounding):

Code:
Date		MarginBot Returns	 MarginBot $50,000 Return 	FRR Returns	 FRR $50,000 Return 
10/31/2014 0.0727% $36.33 0.061% $30.70
11/1/2014 0.0701% $35.06 0.067% $33.64
11/2/2014 0.0715% $35.75 0.066% $32.99
11/3/2014 0.0706% $35.32 0.067% $33.32
11/4/2014 0.0699% $34.93 0.065% $32.52
11/5/2014 0.0667% $33.36 0.062% $31.03
11/6/2014 0.0651% $32.56 0.057% $28.30
11/7/2014 0.0652% $32.62 0.056% $27.78
11/8/2014 0.0615% $30.76 0.055% $27.45
11/9/2014 0.0598% $29.88 0.059% $29.44
11/10/2014 0.0589% $29.47 0.061% $30.67
11/11/2014 0.0582% $29.09 0.059% $29.64
11/12/2014 0.0577% $28.83 0.052% $26.12
11/13/2014 0.0764% $38.20 0.080% $39.99
11/14/2014 0.0891% $44.55 0.063% $31.75
11/15/2014 0.0751% $37.54 0.048% $24.00
11/16/2014 0.0689% $34.46 0.047% $23.30
11/17/2014 0.0727% $36.34 0.068% $34.15
11/18/2014 0.0713% $35.64 0.067% $33.53
11/19/2014 0.0701% $35.05 0.067% $33.61
11/20/2014 0.0691% $34.53 0.066% $33.11

$720.22 $646.98

Total Difference 11.320% $73.23


and i'm pretty sure this would hold up over any rate spikes, since my returns always spike by quite a bit along with the rates...  like i said, theres almost always some money coming off loan to take advantage of any spikes, and since loans update every 10 minutes, it catches even tiny flash spikes...

The above is adjusted so our days match up by the way
Edit: and I rounded all my returns to 5 decimals to keep it fair
Edit 2: argh, formatting tables here is a pain, heres the csv i used to make this, if anyone is interested:
http://fuckedgox.com/MBot/MarginBotCompare.csv


full member
Activity: 136
Merit: 100
Well consider me taken by surprise... I wasn't expecting it but, if I have the alignment of days right, your bot is outperforming my manual swap-managing. Not 100% of the time and not by very much, but for a majority of the days listed.

That said, it looks like I make up most of the difference by reacting better for those 2 days when the rates spiked - looking at the overall percentage increase across the full period, it's... well that's very slightly in the bot's favour too, but I think it's close enough to call it a wash, and suggests that if rates ever spiked for longer I might pull ahead.

Still, further evidence for the proposition that idle funds is the main thing to avoid.
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
So, I just realized, if anyone was trying to email the "bug report" address found in the code of this bot, it wasn't forwarding correctly to me.  It's fixed now, but any emails sent before this morning probably didn't make it to me.  Sorry about that.    Undecided
full member
Activity: 172
Merit: 100
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
Very interesting project!

Can you elaborate a bit on what algorithm the bot uses to determine the lending rate at which it will put the offer? Will it always try to lend as much as possible or can you set limits like "lend out 1k per hour"?

I'm actually in bed using a tablet right now, so I can get you a much more detailed reply tomorrow if this doesn't clear it up, but here is a copy/paste of basically the same question answered over on reddit:
(also, there is no setting to limit the amount it lends per hour.  It tries to keep everything lent all the time.  My philosophy, and the last year of experience, has taught me that hours of interest lost waiting for a slightly higher rate will end up losing far more than you'll ever make up on the slightly higher rates.  Also, as this bot splits available money among several loans, after a while, you end up having a lot of small loans out, which means there is almost always a loan closing, so there's almost always at least a little available to lend when rates do spike.  If you really want to keep some available for spikes, there is a High Hold setting that lets you basically set aside $x to lend at a minimum of y% / day )


From Reddit: http://www.reddit.com/r/bitfinex/comments/2mt0nv/marginbot_a_bitfinex_margin_lending_management_bot/
Quote
basically, if you look at the settings image:



theres a couple of settings of interest:
  • Gap Top
  • Gap Bottom
  • Spread Lends
basically it splits your current available money into (Spread Lends) loans, then it loads the full lendbook from bitfinex. It skips through the lendbook until it hits (Gap Bottom) $USD in total value, and offers the first loan at this rate -.0001%/day.
If your Spread Lends is higher than 1, it will then try to evenly spread the rest of your money between the Gap Bottom setting and the Gap Top setting. For Example:
Gap Bottom = $25,000
Gap Top = $100,000
Spread Lends = 3
so, it will look through the lendbook, find the rate where where the total offers = $25,000 for lend 1
then it'll find the rate where total offers = $62,500 (midway between $25,000 and $100,000) for lend offer 2
then it'll find the rate where total offers = $100,000 for lend offer 3
However, it will never lend lower than your Minimum Lend Rate setting. Also, it will make all offers for 2 days, unless the rate is above your "Minimum for 30 Day" setting, then it'll make the offer for 30 days. This is so it can catch flash runs and try to keep high rate loans out for as long as possible.
full member
Activity: 172
Merit: 100
Very interesting project!

Can you elaborate a bit on what algorithm the bot uses to determine the lending rate at which it will put the offer? Will it always try to lend as much as possible or can you set limits like "lend out 1k per hour"?
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
Get history_USD, filter by Description "Swap Payment on wallet deposit", divide Balance by Amount and multiply by 100, then add another column for the date (I just used the date the interest was paid). Since the percentages were relatively small, I used 5 digits after the comma for no real reason.

I should also mention, the bot does this automatically every day to calculate returns (exactly this formula), so figuring out your actual returns with this bot running is a breeze.  It automatically updates a database table that looks like this:

Code:
id		userid	tid		date		balance		return	return_percent
343 1 1389744985 1/14/2014 21969.48 135.58 0.617142
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
Code:
11/1/2014		0.070107%
11/2/2014 0.071485%
11/3/2014 0.070634%
11/4/2014 0.069861%
11/5/2014 0.066710%
11/6/2014 0.065107%
11/7/2014 0.065237%
11/8/2014 0.061520%
11/9/2014 0.059754%
11/10/2014 0.058940%
11/11/2014 0.058172%
11/12/2014 0.057646%
11/13/2014 0.076388%
11/14/2014 0.089101%
11/15/2014 0.075083%
11/16/2014 0.068916%
11/17/2014 0.072677%
11/18/2014 0.071281%
11/19/2014 0.070086%
11/20/2014 0.069047%

legendary
Activity: 2618
Merit: 1007
Exactly.

Get history_USD, filter by Description "Swap Payment on wallet deposit", divide Balance by Amount and multiply by 100, then add another column for the date (I just used the date the interest was paid). Since the percentages were relatively small, I used 5 digits after the comma for no real reason.
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
%/day would be great, I'll look into parsing the csv files...

Ok, just want to make sure we're parsing the same info here, so %/day after fees right?
legendary
Activity: 2618
Merit: 1007
%/day would be great, I'll look into parsing the csv files...

Edit: Done. I'm not sure if I did more manual work a few months back, but recently I mostly tried (when I thought FRR might go down further) to have whatever is available in some fixed rates if I got around to set some (every 2 days or so), the rest ran on "autopilot". Here's the swap payment data for November, depending on how you view "days", it could be one day off.

Code:
0,06140%	01.11.2014
0,06727% 02.11.2014
0,06598% 03.11.2014
0,06663% 04.11.2014
0,06504% 05.11.2014
0,06206% 06.11.2014
0,05659% 07.11.2014
0,05555% 08.11.2014
0,05490% 09.11.2014
0,05887% 10.11.2014
0,06133% 11.11.2014
0,05927% 12.11.2014
0,05223% 13.11.2014
0,07998% 14.11.2014
0,06349% 15.11.2014
0,04800% 16.11.2014
0,04660% 17.11.2014
0,06829% 18.11.2014
0,06706% 19.11.2014
0,06721% 20.11.2014
0,06621% 21.11.2014
full member
Activity: 145
Merit: 100
I do Stuff, and stuff.....
I should also point out that chart above is an actual account running the bot, with real returns AFTER FEES, so you can get an estimate of returns from there....  It is an account that occasionally gets used for trading and paying bills though, so its not a 100% pristine investment return.

Pages:
Jump to: