Pages:
Author

Topic: Automated Trading Platform - Any Interest? (Read 4362 times)

full member
Activity: 179
Merit: 100
September 16, 2012, 10:49:11 AM
#43
Awesome Isis, I must I say think your awesome for putting this up and the work you are doing on open-pay, I like the idea of the project and will be following it in the future Smiley
full member
Activity: 154
Merit: 102
full member
Activity: 154
Merit: 102
September 15, 2012, 06:25:43 PM
#41
do i donate to you signature address or there is another donation for this java software ?



Signature address is fine.  Its the address for the Open Payment Alliance, but at the moment that's just me.

Once we get some more members then I will deep freeze that key.
full member
Activity: 154
Merit: 102
September 15, 2012, 06:18:22 PM
#40
It's up!
https://github.com/openpay/OpenPay/blob/master/Isis-ATP/bin/isis.jar
If someone would please compile a 32 bit version and get it to me I'll put that one up too.

Please consider donating if you find this application useful especially if it makes you a profit Wink
USE AT YOUR OWN RISK!

DO NOT USE THIS TO TRADE MONEY YOU CANNOT AFFORD TO LOSE!
ALSO THE STOP LOSS FUNCTION HAS BEEN REMOVED UNTIL FURTHER NOTICE, SO BE CAREFUL.

I'll be creating a new thread with information on configuration, setup etc.
member
Activity: 112
Merit: 10
September 14, 2012, 08:18:48 PM
#39
I've decided that I don't have the time or resources to commercialize it.
I need to get back to openpay as soon as possible and this bot is turning into a huge time sink.

I don't want to dink around with licensing enforcement, drm and other bs, so I'm going to gpl it and put it up on github.  If it makes you some money please consider donating something to openpay because I'm between contracts right now and really want to see that come to life before I go back to fulltime work
.

You sir are a gentleman and a scholar. Also, it will be fun hacking this thing apart! Cheesy
full member
Activity: 154
Merit: 102
September 14, 2012, 07:59:14 PM
#38
I've decided that I don't have the time or resources to commercialize it.
I need to get back to openpay as soon as possible and this bot is turning into a huge time sink.

I don't want to dink around with licensing enforcement, drm and other bs, so I'm going to gpl it and put it up on github.  If it makes you some money please consider donating something to openpay because I'm between contracts right now and really want to see that come to life before I go back to fulltime work
.
legendary
Activity: 1358
Merit: 1002
September 14, 2012, 07:51:47 PM
#37
I can test it if you'd like. With the money I lost to pirate I don't mind losing 100 BTC more testing your bot. 
Go big or go bust. Fuck it. lol

Ya know it's both funny and sad.  I generated an address back when Pirate was considered at least somewhat legit. 
1M8nRjt4XGVrd7cnwn1V....

First mate anyone?
Wasn't a vanity thing, just sorta happened that way. I'm considering removing it from my wallet.

Back to the topic at hand though.  I've got one more show stopper to track down and then I'm posting jars.


OK.  Pm me the bot with instructions to set it up if they're needed and I'll let it burn 100 BTC.  Let's hope not lol
full member
Activity: 154
Merit: 102
September 14, 2012, 07:44:55 PM
#36
I can test it if you'd like. With the money I lost to pirate I don't mind losing 100 BTC more testing your bot. 
Go big or go bust. Fuck it. lol

Ya know it's both funny and sad.  I generated an address back when Pirate was considered at least somewhat legit. 
1M8nRjt4XGVrd7cnwn1V....

First mate anyone?
Wasn't a vanity thing, just sorta happened that way. I'm considering removing it from my wallet.

Back to the topic at hand though.  I've got one more show stopper to track down and then I'm posting jars.
BCB
vip
Activity: 1078
Merit: 1002
BCJ
September 14, 2012, 05:12:14 PM
#35
That's the attitude psy. Bitcoin (any) speculation is not for the faint of heart
legendary
Activity: 1358
Merit: 1002
September 14, 2012, 04:50:44 PM
#34
I can test it if you'd like. With the money I lost to pirate I don't mind losing 100 BTC more testing your bot. 
Go big or go bust. Fuck it. lol
zaj
member
Activity: 103
Merit: 10
September 14, 2012, 03:18:24 PM
#33
does the volume matter for a trading bot? since the eu volume is in the single digits at times ... wouldnt it be better to trade on gox usd since its more active?
full member
Activity: 154
Merit: 102
September 14, 2012, 02:15:31 PM
#32
As of a couple minutes ago my bot crashed.  Evidently it tried to divide by zero during an Ask and I just didn't think to trap for it there.

Since it crashed I'm going to have to calculate my Profit & Loss by hand.

0.00000000BTC  &  51.2989USD

I started this with 2 BTC and 0 USD.
I sold 1 BTC for 10.92 USD

Thus my original 2 BTC were worth $21.84 at the time
Now if I had just held onto my 2 until now the strike price currently being $11.79, I would have had $23.58.

$23.58 - $21.84 = $1.74

$51.29 - $23.58 = $27.71

That's a 145% increase! (assuming I did the math correctly)  
Although now the algorithm has to wait for the market to come back down for me to keep in the game, or I have to find some way to fund my mtgox account with more money Wink






member
Activity: 112
Merit: 10
September 14, 2012, 02:11:42 PM
#31
This is interesting. I am in if a spot opens up for further testing.
member
Activity: 70
Merit: 10
Who shot who in the what now?
September 14, 2012, 01:23:01 PM
#30
This looks really interesting. I'll keep an eye on you! Wink
I'm not on MtGox, so unfortunately I can't help testing the algorithms.


Keep it up!
drekk

full member
Activity: 154
Merit: 102
September 14, 2012, 10:43:10 AM
#29
Not sure if you saw my PM last night. I'm interested in letting it go wild on my mtgox account.

My pm box is so flooded right now its going to tak a long time to go through it all.
Since we have 2 algorithims to test I may want to bring in 20.  Right now we are at 10 with 5 in reserve.

I will do some more math and let you know what I come up with.  Just not sure I can support 20 people right now.
hero member
Activity: 697
Merit: 500
September 14, 2012, 10:16:16 AM
#28
Not sure if you saw my PM last night. I'm interested in letting it go wild on my mtgox account.
full member
Activity: 154
Merit: 102
September 14, 2012, 09:44:53 AM
#27
So I realized that some trades were failing to execute because they were below the minimum tradeable amount.
This was triggering a flaw in the ordering logic which was the source of some of the more interesting notes in my logs.
I've now added both min and max currency amounts.

Quote
High: Ticker [timestamp=2012-09-14T12:37:52.430Z, last=USD 11.52338, bid=USD 11.52338, ask=USD 11.52572, tradableIdentifier=BTC, volume=2949494761223]
Low: Ticker [timestamp=2012-09-14T12:42:37.605Z, last=USD 11.43251, bid=USD 11.43351, ask=USD 11.5233, tradableIdentifier=BTC, volume=2944701489592]
Current: Ticker [timestamp=2012-09-14T13:30:05.568Z, last=USD 11.51, bid=USD 11.451, ask=USD 11.51, tradableIdentifier=BTC, volume=2959960727343]
VWAP: 11.51947
The market is trending down.


Sep 14, 2012 7:30:47 AM org.open.payment.alliance.isis.atp.TradingAgent evalBid
INFO: Attempting to buy 0.00000000 USD
Sep 14, 2012 7:30:47 AM org.open.payment.alliance.isis.atp.TradingAgent evalBid
INFO: 0.00000000 was less than the configured minimum of 0.01
Increasing order size to 0.01
Sep 14, 2012 7:30:47 AM org.open.payment.alliance.isis.atp.TradingAgent marketOrder
INFO: You are in simulation mode, the transaction below did NOT actually occur.
Sep 14, 2012 7:30:47 AM org.open.payment.alliance.isis.atp.TradingAgent marketOrder
INFO: Successfully bought 0.01 at current market price.

So it looks like that part is resolved.  Now for the interesting part.

In my code the algorithm is using max only as a ceiling constraint and it's calculating how much to trade using your balance as the starting point.

When I ran my simulations on the hadoop cluster max was used in the same place in the algorithm as we're using the balance now.

Both situations will always produce a trade between 0 and Max.  The difference being, if you have a substantial balance you'll be trading Max much more often, where as the optimal algorithm identified by my simulations had Max being traded rarely if ever.

I'd like to test both and see which is more performant.  I have a hunch that this "mistake" is primarily why I'm seeing such high profit/loss.

I'll add an option to the setup interview to let you pick one or the other but I need you to pick, understand the risks and roll with it for the entire month.  Keep in mind that the difference is in how much is risked per trade, the decision on whether or not it's time to trade at all is a different step.

So let's walk through it a moment.

With the ATP, trading occurs in two steps.  

First is to determine "are market conditions favoring, buy, sell or hold right now?"
Second is to determine "how much do I trade right now?"

Market Conditions means all trades that have actually occurred in the last hour.

These are summed at each tick and a VWAP (Volume Weighted Average Price) (Each trade on the ticker multiplied by each trade's quantity.  Each is then summed and the sum is divided by the total volume)
 
3 indicators called arrows are generated as well, we have a trendArrow, bidArrow and askArrow.

Each arrow can be any one of positive, negative or 0.
If it's 0 that means the market is completely flat, so we have to wait.

If the trendArrow is positive it means that prices for bitcoins are going up relative to your local currency, thus we should look at selling some of ours off.  If the trendArrow is down, then it means prices are going down relative to your local currency and we should look at buying.

Once the trendArrow has been evaluated and we know the market is trading, we want to time our entry and exit into the market to maximize our profit.

We do that by comparing the last trade with the vwap.  

If the trendArrow is up, then we compare the last trade from the ticker with the vwap.  If it's above the vwap then we sell (at market prices).

If the trendArrow is down, then we compare the last trade from the ticker with the vwap.  If it's below the vwap then we buy (again at market prices).

The decision has now been set in stone, we are buying (or selling).  The only question now is how many BTC do we buy or sell?

Here are the two Bid algorithms in question, the Ask is the same algo, but instead of askArrow we use the bidArrow and instead of local currency we use BTC

I'll let you do your own math.

Trading Algorithm 1
Code:
			BigDecimal weight = new BigDecimal((askArrow / ticker.size()) * (trendArrow / ticker.size()));
BigDecimal balance = AccountManager.getInstance().getBalance("USD").getAmount();
BigDecimal amountToSpend = balance.multiply(weight).multiply(fee);



Algorithm 2
Code:

BigDecimal weight = new BigDecimal((askArrow / ticker.size()) * (trendArrow / ticker.size()));
BigDecimal amountToSpend = maxLocal.multiply(weight).multiply(fee);




The askArrow (or bidArrow if we're selling), is calculated the same way as the trendArrow but uses the "ask" value from the ticker.
It's purpose is to let us know if people(or bots) placing limit orders are raising or lowering their prices.

Both of these values are multiplied together to give us a weight.

That weight is multiplied against (max or balance) and determines how MUCH we are trading.

That's it for now.  You now know enough (hopefully) to choose your trading algorithm. Let me know what you think!
sr. member
Activity: 386
Merit: 250
September 14, 2012, 09:34:01 AM
#26
my local currency is euro but i can still use gox usd. so how do i get started? Smiley

There are two ways.
You can wait a day or so and I'll have it localized, which honestly is the best option.

The second option is to open a USD wallet.  To do that, log into mtgox.  Go to settings.  Change the default currency to USD and check the box that says "create a new wallet in that currency", then hit save.  Next trade 1BTC or whatever into that currency so you have a balance.

If your still looking or taking folks to work with this happy to help or get in line to help
zaj
member
Activity: 103
Merit: 10
September 14, 2012, 08:48:53 AM
#25
il wait a day then Smiley
full member
Activity: 154
Merit: 102
September 14, 2012, 08:35:59 AM
#24
my local currency is euro but i can still use gox usd. so how do i get started? Smiley

There are two ways.
You can wait a day or so and I'll have it localized, which honestly is the best option.

The second option is to open a USD wallet.  To do that, log into mtgox.  Go to settings.  Change the default currency to USD and check the box that says "create a new wallet in that currency", then hit save.  Next trade 1BTC or whatever into that currency so you have a balance.
Pages:
Jump to: