Pages:
Author

Topic: Isis ATP [Automated Trading Platform] - Discussion - page 25. (Read 45225 times)

full member
Activity: 154
Merit: 102
I'm going to give you a multi-currency arbitrage version in the next 48 hours though.


I'll wait for the multi-currency version then. Smiley

Let me clarify that.  The arbitrage bot is only for Psy at the present time because we're all very poor and if anyone tries to run it without at least 32 BTC in their account they are very likely to be bankrupt very quickly and Psy is crazy enough to try it and let us know how it works out Wink
legendary
Activity: 1358
Merit: 1002
I'm going to give you a multi-currency arbitrage version in the next 48 hours though.


I'll wait for the multi-currency version then. Smiley
full member
Activity: 154
Merit: 102
If we save several jar files each one on it's own dir is it possible to have each one trade a different currency pair or does the fact of the config file being stored on the .java dir makes that impossible?

If I were doing that I would run each under it's own user.  Otherwise the configs are shared for all instances on a per-user basis.

I'm going to give you a multi-currency arbitrage version in the next 48 hours though.
legendary
Activity: 1358
Merit: 1002
If we save several jar files each one on it's own dir is it possible to have each one trade a different currency pair or does the fact of the config file being stored on the .java dir makes that impossible?
full member
Activity: 154
Merit: 102
Added an overall PL, 0.2% is about what I would expect considering the market right now looks like a pancake.

I'm going to commit now.

Code:
Sep 17, 2012 2:53:39 PM org.open.payment.alliance.isis.atp.TradingAgent run
INFO: Ticker Size: 201 | Trend Arrow: 8.0 | Bid Arrow: 0.0 | Ask Arrow: 0.0 | VWAP: USD 11.86921
Sep 17, 2012 2:53:39 PM org.open.payment.alliance.isis.atp.TradingAgent evalAsk
INFO: Weight is 0.03980099502487562
Sep 17, 2012 2:53:39 PM org.open.payment.alliance.isis.atp.TradingAgent evalAsk
INFO: Attempting to sell 0.0635747044776119390853776069949532256941893137991428375244140625 of 1.59731445 BTC available
Sep 17, 2012 2:53:40 PM org.open.payment.alliance.isis.atp.TradingAgent marketOrder
INFO: Successfully sold 0.0635747044776119390853776069949532256941893137991428375244140625 at current market price.
Sep 17, 2012 2:53:40 PM org.open.payment.alliance.isis.atp.TradingAgent marketOrder
INFO: Current P/L: BTC -0.83268555 | -34.26689500%
Sep 17, 2012 2:53:40 PM org.open.payment.alliance.isis.atp.TradingAgent marketOrder
INFO: Current P/L: USD 9.86083 | 34.47200%
Sep 17, 2012 2:53:40 PM org.open.payment.alliance.isis.atp.TradingAgent marketOrder
INFO: Overall P/L: 0.20510500%
Sep 17, 2012 2:53:40 PM org.open.payment.alliance.isis.atp.TradingAgent marketOrder
INFO: AccountInfo [username=isis, wallets=[Wallet [balance= BTC 1.59731445], Wallet [balance= USD 38.46642], Wallet [balance= EUR 0.09964], Wallet [balance= GBP 0.07921], Wallet [balance= AUD 0.22792], Wallet [balance= CAD 0.21845], Wallet [balance= CHF 0.10945], Wallet [balance= JPY 9.773], Wallet [balance= CNY 0.72304], Wallet [balance= DKK 0.7253], Wallet [balance= HKD 9.80315], Wallet [balance= NZD 0.15005], Wallet [balance= PLN 0.36728], Wallet [balance= RUB 3.59428], Wallet [balance= SEK 0.757], Wallet [balance= THB 3.90461]]]
full member
Activity: 154
Merit: 102
ATP is OFF waiting for update

Thanks for the info.  Looks like the old version was just trading all the way up and down the curve, thus any gains or losses were the result of the bitcoin market itself and not any optimum peak/valley capture.

The corrected algorithm should capture within a few percentage points of a peak or valley (sell / buy respectively).

Problem is the market is currently dead flat, without momentum trades will not occur.

As soon as I can get a few more trades in I'll get a new commit up for everyone.

BCB
vip
Activity: 1078
Merit: 1002
BCJ
Anyone else notice that the Ask price hasn't budged in several hours?

I think that is just you.  My has moved and is currently accurate.
BCB
vip
Activity: 1078
Merit: 1002
BCJ
ATP is OFF waiting for update
full member
Activity: 154
Merit: 102
Anyone else notice that the Ask price hasn't budged in several hours?
sr. member
Activity: 252
Merit: 250
Inactive

...
So to answer your question, the algorithm as implemented is not the same algorithm as tested.
In the process of discovering that fact, I've also found permutations of the algorithm that according to my handy dandy calculator should show dramatically different (perhaps better) results.  However I don't have the resource to sit and devote to this, but I'm the kind of person who can't resist a challenge either. Wink


It's an interesting experiment.
full member
Activity: 154
Merit: 102
Trade sizes appear to be corrected.

Code:
 Order Filled at: Mon 17 Sep 2012 08:08:54 PM GMT
        Amount: 0.06323842 BTC
        Price: @$11.94901
        Total: $0.75564

        Order Filled at: Mon 17 Sep 2012 08:09:54 PM GMT
        Amount: 0.06022707 BTC
        Price: @$11.94901
        Total: $0.71965

full member
Activity: 154
Merit: 102
With the new "arrow" information I was able to find and fix the churning bug.  It was related to the minimum order size.  Previously if the algorithm suggested a trade below the minimum order size the application would up the trade size to the minimum.  This was causing lots of "minimum order trades" up and down the trendline thereby diluting profits (and losses).

I have it bailing out now at that point and saying "There isn't enough momentum to trade at this time.", which is the truth.
Running it now, will report my results in a few hours.

That explains the behavior I've seen. Using the settings maxbtc 25, minbtc 0.01, maxusd 75, minusd 0.01, risk 0.50, and the high risk option I have a loss of about $0.60 usd after 12 hours.

You have stated you ran multi year backtests to reach the current strategy, why then are you modifying that strategy opposed to running exactly what performed well in the backtest?

You have stated you do not have enough spare funds to properly forward test the strategy, why not just add a few lines to have ATP log simulated trades, btc/usd price, time, and all the various information that would allow you to see the strategies performance without risking any btc?

I assume you are aware it is easy to create a strategy which is form fitted to a set of historical data, which then performs horribly in forward testing. Without any of the hard numbers and results from your map reduce testing there is no way to determine if this is the case. There are enough customizable variables (min/max, risk tolerance, etc) that widely varying results should be seen. I am still not clear which set of these variables performed well against historical data.

While the strategy may not be the long lost holy grail I have certainly had fun toying with it. Once new commits are made I will update and let it continue to run.

It comes down to an issue of algorithmic translation and peculiarities of java math.

It's one thing to say
weight = trendArrow + bidArrow / ticker.size and expect a fractional weight.

But if trendArrow and bidArrow are integers and you divide them it's not a fraction, it's 0.
If you take a weight of 0 and multiply it by your balance it's going to be 0.


I believe I have now corrected those issues and I'm forward trading on my own account to see the difference in performance and on the whole it seems to be working again.

Code:
Sep 17, 2012 1:49:32 PM org.open.payment.alliance.isis.atp.TradingAgent run
INFO: Ticker Size: 178 | Trend Arrow: 4.0 | Bid Arrow: 9.0 | Ask Arrow: 0.0 | VWAP: USD 11.89337
Sep 17, 2012 1:49:38 PM org.open.payment.alliance.isis.atp.TradingAgent evalAsk
INFO: Weight is 0.07262569832402235
Sep 17, 2012 1:49:39 PM org.open.payment.alliance.isis.atp.TradingAgent evalAsk
INFO: Attempting to sell 0.165061124189944149231963066437600673452834598720073699951171875 of 2.27276471 BTC available
Sep 17, 2012 1:49:39 PM org.open.payment.alliance.isis.atp.TradingAgent marketOrder
INFO: Successfully sold 0.165061124189944149231963066437600673452834598720073699951171875 at current market price.
Sep 17, 2012 1:49:39 PM org.open.payment.alliance.isis.atp.TradingAgent marketOrder
INFO: Current P/L: BTC -0.15723529 %-6.47058800
Sep 17, 2012 1:49:39 PM org.open.payment.alliance.isis.atp.TradingAgent marketOrder
INFO: Current P/L: USD 1.85987 %6.50200
Sep 17, 2012 1:49:39 PM org.open.payment.alliance.isis.atp.TradingAgent marketOrder
INFO: AccountInfo [username=isis, wallets=[Wallet [balance= BTC 2.27276471], Wallet [balance= USD 30.46546], Wallet [balance= EUR 0.09964], Wallet [balance= GBP 0.07921], Wallet [balance= AUD 0.22792], Wallet [balance= CAD 0.21845], Wallet [balance= CHF 0.10945], Wallet [balance= JPY 9.773], Wallet [balance= CNY 0.72304], Wallet [balance= DKK 0.7253], Wallet [balance= HKD 9.80315], Wallet [balance= NZD 0.15005], Wallet [balance= PLN 0.36728], Wallet [balance= RUB 3.59428], Wallet [balance= SEK 0.757], Wallet [balance= THB 3.90461]]]

It's a stupid mistake and I wouldn't have made it, but I wasn't familiar with this "BigMoney" class that's being used by the API and assumed that it was truncating the display value, but that the actual value would be essentially correct.  I was wrong.  But that's why the huge disclaimer and the fact that you need to pass a command line option to enable live trading.

So to answer your question, the algorithm as implemented is not the same algorithm as tested.
In the process of discovering that fact, I've also found permutations of the algorithm that according to my handy dandy calculator should show dramatically different (perhaps better) results.  However I don't have the resource to sit and devote to this, but I'm the kind of person who can't resist a challenge either. Wink
sr. member
Activity: 409
Merit: 250
With the new "arrow" information I was able to find and fix the churning bug.  It was related to the minimum order size.  Previously if the algorithm suggested a trade below the minimum order size the application would up the trade size to the minimum.  This was causing lots of "minimum order trades" up and down the trendline thereby diluting profits (and losses).

I have it bailing out now at that point and saying "There isn't enough momentum to trade at this time.", which is the truth.
Running it now, will report my results in a few hours.

That explains the behavior I've seen. Using the settings maxbtc 25, minbtc 0.01, maxusd 75, minusd 0.01, risk 0.50, and the high risk option I have a loss of about $0.60 usd after 12 hours.

You have stated you ran multi year backtests to reach the current strategy, why then are you modifying that strategy opposed to running exactly what performed well in the backtest?

You have stated you do not have enough spare funds to properly forward test the strategy, why not just add a few lines to have ATP log simulated trades, btc/usd price, time, and all the various information that would allow you to see the strategies performance without risking any btc?

I assume you are aware it is easy to create a strategy which is form fit to a set of historical data, which then performs horribly in forward testing. Without any of the hard numbers and results from your map reduce testing there is no way to determine if this is the case. There are enough customizable variables (min/max, risk tolerance, etc) that widely varying results should be seen. I have not seen it mentioned which set of these variables performed well against historical data.

While the strategy may not be the holy grail I have certainly had fun toying with it. Once new commits are made I will update and let it continue to run.
legendary
Activity: 1358
Merit: 1002
Is that the reason I keep seeing.  I have set min=1; max=10;


Code:
INFO: Attempting to sell 0.00000000 of xxxx.22053628 BTC available
Sep 17, 2012 7:22:21 PM org.open.payment.alliance.isis.atp.TradingAgent evalAsk
INFO: 0.00000000 was less than the configured limit of 1
Increasing order size to 1

Yeah, that's the exact same thing I'm seeing. It's trading without a good enough signal.
BCB
vip
Activity: 1078
Merit: 1002
BCJ
Is that the reason I keep seeing.  I have set min=1; max=10;


Code:
INFO: Attempting to sell 0.00000000 of xxxx.22053628 BTC available
Sep 17, 2012 7:22:21 PM org.open.payment.alliance.isis.atp.TradingAgent evalAsk
INFO: 0.00000000 was less than the configured limit of 1
Increasing order size to 1
legendary
Activity: 1358
Merit: 1002
Probably that's the reason I'm down those 0.3 BTC, as most of the trades did in fact got upped to the minimum order and executed.
full member
Activity: 154
Merit: 102
I switched to USD.
It was odd seeing it selling and buying EUR but showing me USD tickers. lol
Also because the EUR market has a very low volume.
I took the opportunity to switch currency when I was all-in on BTC.

I've been checking and the app VWAP is most of the time 0.05 BTC above the MtGox VWAP

I've added the ability to see all the market indicators we use to trade.
Code:
INFO: Trend Arrow: 1 | Bid Arrow: 5 | Ask Arrow: 0


I've also modified the weight calculation for the "High Risk" trading algorithm to be much more aggressive (curve elastic) and more in line with the algorithm I originally used on day 1.

(substitute askArrow for bidArrow depending on if we are looking to sell (bidArrow) or buy (askArrow)
High Risk
Code:
weight = new BigDecimal((bidArrow + trendArrow) / ticker.size());

The low risk algorithm is unchanged.
Low Risk
Code:
weight = new BigDecimal((bidArrow / ticker.size()) * (trendArrow / ticker.size()));

The hope is that this will cause more curve capture towards the peaks and valleys of the curves while minimizing the churning we've been seeing.

I've split my balances 50/50 @ USD 11.94290 which was the current market at the time I restarted my bot.

I'll report the PL in a few hours, if it's doing good I'll make a commit with the new algorithm.


With the new "arrow" information I was able to find and fix the churning bug.  It was related to the minimum order size.  Previously if the algorithm suggested a trade below the minimum order size the application would up the trade size to the minimum.  This was causing lots of "minimum order trades" up and down the trendline thereby diluting profits (and losses).

I have it bailing out now at that point and saying "There isn't enough momentum to trade at this time.", which is the truth.
Running it now, will report my results in a few hours.
full member
Activity: 154
Merit: 102
I switched to USD.
It was odd seeing it selling and buying EUR but showing me USD tickers. lol
Also because the EUR market has a very low volume.
I took the opportunity to switch currency when I was all-in on BTC.

I've been checking and the app VWAP is most of the time 0.05 BTC above the MtGox VWAP

I've added the ability to see all the market indicators we use to trade.
Code:
INFO: Trend Arrow: 1 | Bid Arrow: 5 | Ask Arrow: 0


I've also modified the weight calculation for the "High Risk" trading algorithm to be much more aggressive (curve elastic) and more in line with the algorithm I originally used on day 1.

(substitute askArrow for bidArrow depending on if we are looking to sell (bidArrow) or buy (askArrow)
High Risk
Code:
weight = new BigDecimal((bidArrow + trendArrow) / ticker.size());

The low risk algorithm is unchanged.
Low Risk
Code:
weight = new BigDecimal((bidArrow / ticker.size()) * (trendArrow / ticker.size()));

The hope is that this will cause more curve capture towards the peaks and valleys of the curves while minimizing the churning we've been seeing.

I've split my balances 50/50 @ USD 11.94290 which was the current market at the time I restarted my bot.

I'll report the PL in a few hours, if it's doing good I'll make a commit with the new algorithm.
legendary
Activity: 1358
Merit: 1002
I switched to USD.
It was odd seeing it selling and buying EUR but showing me USD tickers. lol
Also because the EUR market has a very low volume.
I took the opportunity to switch currency when I was all-in on BTC.

I've been checking and the app VWAP is most of the time 0.05 BTC above the MtGox VWAP
full member
Activity: 154
Merit: 102
I'm down 0.30 BTC. No profit whatsoever =/
The only one profiting so far is MtGox lol

Psy, what's the Euro volume looking like and what does the application say the market looks like and what's the application vwap vs the mtgox vwap?
Pages:
Jump to: