Pages:
Author

Topic: ATP [Advanced Trading Platform] - page 7. (Read 20926 times)

sr. member
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
June 15, 2013, 03:12:47 PM
#95
What's your advice on bid and ask logic ?

I advise using bid and ask logic that will make a profit  Grin
newbie
Activity: 52
Merit: 0
June 15, 2013, 02:58:58 PM
#94
Hum.

Maybe.

What's your advice on bid and ask logic ?
sr. member
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
June 15, 2013, 02:56:46 PM
#93
Really strange

Maybe not.

I would say there is a problem with your trading logic. A rogue character or misspelling maybe?
newbie
Activity: 52
Merit: 0
June 15, 2013, 02:52:10 PM
#92
Ok thx.
I found an error while testing following trend.

org.codehaus.commons.compiler.CompileException: Line 0, Column 0: Unexpected token "End-Of-File" in primary

It happened when the ticker size was above the minimum I set


Really strange
sr. member
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
June 15, 2013, 02:48:01 PM
#91
The arbitrage algorithm is Novas work and perhaps he can explain it better than I can. But here is his recent thoughts on it:

24hr performance with the Arbitrage bot was terrible, so much so that I decided to debug the algorithm step by step and realized several key assumptions in it are in fact invalid.  I think it will probably need to be scraped.

Just make sure to disable the Arbitrage Trader because it has some major issues.

I don't fully understand how Nova's algorithm works so I had rewritten the original Isis ATP arbitrage algorithm to use a Bellman-Ford Shortest Path /  Edge-weighted digraph algorithm. In tests I found that this made the same trades as Nova's simpler algorithm so I scrapped mine.

I had given the arbitrage code a total overhaul and implemented a Bellman-Ford algorithm to calculate opportunities. From my brief testing, it found the same opportunities as the original code so I re-implemented the original again.
hero member
Activity: 981
Merit: 500
DIV - Your "Virtual Life" Secured and Decentralize
June 15, 2013, 01:37:04 PM
#90
Aido,

Could you explain a bit more how your arbitrage algorithm work ?

From what I understand from simulation, you compare changing real currency 1 to real currency 2 through bitcoin and through regular trading ?

So we don't actually make money with this right ? How do we benefit from this.

Example if my local currency is USD, if at t=1 I have an arbitrage with Euro
I trade through bitcoin and get euro. But then if I don't have reverse arbitrage to get back to USD for a while, depending on trends of USD/EURO I may loose money.

Am I wrong ? or did I miss something ?

thanks for your help

The points you make seem to be correct. I see another problem with arbitrage in that the currencies do not have to actually be at their correct value unless you took them to a different place to trade them back. It was said in the other thread that a wrong assumption was made and arbitrage could lose money. Likely the arbitrage engine isn't a good idea to use.
newbie
Activity: 52
Merit: 0
June 15, 2013, 01:09:38 PM
#89
Aido,

Could you explain a bit more how your arbitrage algorithm work ?

From what I understand from simulation, you compare changing real currency 1 to real currency 2 through bitcoin and through regular trading ?

So we don't actually make money with this right ? How do we benefit from this.

Example if my local currency is USD, if at t=1 I have an arbitrage with Euro
I trade through bitcoin and get euro. But then if I don't have reverse arbitrage to get back to USD for a while, depending on trends of USD/EURO I may loose money.

Am I wrong ? or did I miss something ?

thanks for your help
newbie
Activity: 52
Merit: 0
June 15, 2013, 12:28:40 PM
#88
Ok I found it in ~/Library/Preferences/org.aido.atp.plist

newbie
Activity: 52
Merit: 0
June 15, 2013, 12:21:28 PM
#87
On Windows config is stored in the registry, on Mac its stored in .plist files in ~/Library, and on Linux and friends its stored in ~/.java

Thanks

Edit: Actually I don't see any .plist in ~/Library ... Sad
sr. member
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
June 15, 2013, 12:12:47 PM
#86
On Windows config is stored in the registry, on Mac its stored in .plist files in ~/Library, and on Linux and friends its stored in ~/.java
newbie
Activity: 52
Merit: 0
June 15, 2013, 11:55:00 AM
#85
Thanks for this.

Just a little question where is the xml config files on MAX OS 10.8

I wanted to try it but I got an error:

"BTCE returned an error: invalid nonce parameter"

So I wanted to use another key/secret, but I don't find the xml and I don't want to go through all the questions each time I change something.

Do you have an idea where it is ?

Thanks a lot
hero member
Activity: 981
Merit: 500
DIV - Your "Virtual Life" Secured and Decentralize
June 07, 2013, 02:20:11 PM
#84
Same error as before. Not sure why Cloudflare or a bad gateway crashes the whole ATP though.

Code:
2013-06-07 09:14:41,464 ←[1;31m:←[0;39m Error unmarshalling from json:
502 Bad Gateway

502 Bad Gateway



cloudflare-nginx










2013-06-07 09:14:41,464 ←[1;31m:←[0;39m Error unmarshalling from json:
502 Bad Gateway

502 Bad Gateway



cloudflare-nginx










2013-06-07 09:14:41,469 ←[1;31m:←[0;39m ERROR: Caught unexpected MtGox exception, ticker manager shutting down now!. Details are l
isted below.
java.lang.RuntimeException: Problem getting JSON object
        at si.mazi.rescu.JSONUtils.getJsonObject(JSONUtils.java:68)
        at si.mazi.rescu.HttpTemplate.executeRequest(HttpTemplate.java:118)
        at si.mazi.rescu.RestInvocationHandler.invokeHttp(RestInvocationHandler.java:53)
        at si.mazi.rescu.RestInvocationHandler.invoke(RestInvocationHandler.java:48)
        at com.sun.proxy.$Proxy6.getTicker(Unknown Source)
        at com.xeiam.xchange.mtgox.v2.service.polling.MtGoxPollingMarketDataService.getTicker(MtGoxPollingMarketDataService.java:7
7)
        at org.aido.atp.PollingTickerManager.getTick(PollingTickerManager.java:56)
        at org.aido.atp.TickerManager.run(TickerManager.java:91)
        at java.lang.Thread.run(Unknown Source)
Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, St
ring, array, object, 'true', 'false' or 'null')
 at [Source: java.io.StringReader@62c59c35; line: 1, column: 2]
        at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1378)
        at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:599)
        at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:520)
        at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleUnexpectedValue(ReaderBasedJsonParser.java:1387)
        at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:678)
        at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:2834)
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2781)
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1942)
        at si.mazi.rescu.JSONUtils.getJsonObject(JSONUtils.java:64)
        ... 8 more
2013-06-07 09:14:41,473 ←[1;31m:←[0;39m ERROR: Caught unexpected MtGox exception, ticker manager shutting down now!. Details are l
isted below.
java.lang.RuntimeException: Problem getting JSON object
        at si.mazi.rescu.JSONUtils.getJsonObject(JSONUtils.java:68)
        at si.mazi.rescu.HttpTemplate.executeRequest(HttpTemplate.java:118)
        at si.mazi.rescu.RestInvocationHandler.invokeHttp(RestInvocationHandler.java:53)
        at si.mazi.rescu.RestInvocationHandler.invoke(RestInvocationHandler.java:48)
        at com.sun.proxy.$Proxy6.getTicker(Unknown Source)
        at com.xeiam.xchange.mtgox.v2.service.polling.MtGoxPollingMarketDataService.getTicker(MtGoxPollingMarketDataService.java:7
7)
        at org.aido.atp.PollingTickerManager.getTick(PollingTickerManager.java:56)
        at org.aido.atp.TickerManager.run(TickerManager.java:91)
        at java.lang.Thread.run(Unknown Source)
Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, St
ring, array, object, 'true', 'false' or 'null')
 at [Source: java.io.StringReader@3f055bc9; line: 1, column: 2]
        at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1378)
        at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:599)2013-06-07 09:14:42,250 ←[1;3
1m:←[0;39m Error unmarshalling from json:
502 Bad Gateway

502 Bad Gateway



cloudflare-nginx











        at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:520)
        at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleUnexpectedValue(ReaderBasedJsonParser.java:1387)
        at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:678)
        at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:2834)
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2781)
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1942)
        at si.mazi.rescu.JSONUtils.getJsonObject(JSONUtils.java:64)
        ... 8 more
2013-06-07 09:14:41,560 ←[1;31m:←[0;39m Error unmarshalling from json:
502 Bad Gateway

502 Bad Gateway



cloudflare-nginx










2013-06-07 09:14:41,507 ←[1;31m:←[0;39m Error unmarshalling from json:
502 Bad Gateway

502 Bad Gateway



cloudflare-nginx










2013-06-07 09:14:49,413 ←[1;31m:←[0;39m ERROR: Caught unexpected MtGox exception, ticker manager shutting down now!. Details are l
isted below.
java.lang.RuntimeException: Problem getting JSON object2013-06-07 09:14:48,232 ←[1;31m:←[0;39m ERROR: Caught unexpected MtGox exce
ption, ticker manager shutting down now!. Details are listed below.

        at si.mazi.rescu.JSONUtils.getJsonObject(JSONUtils.java:68)
        at si.mazi.rescu.HttpTemplate.executeRequest(HttpTemplate.java:118)
        at si.mazi.rescu.RestInvocationHandler.invokeHttp(RestInvocationHandler.java:53)
        at si.mazi.rescu.RestInvocationHandler.invoke(RestInvocationHandler.java:48)
        at com.sun.proxy.$Proxy6.getTicker(Unknown Source)
        at com.xeiam.xchange.mtgox.v2.service.polling.MtGoxPollingMarketDataService.getTicker(MtGoxPollingMarketDataService.java:7
7)
        at org.aido.atp.PollingTickerManager.getTick(PollingTickerManager.java:56)
        at org.aido.atp.TickerManager.run(TickerManager.java:91)
        at java.lang.Thread.run(Unknown Source)
Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, St
ring, array, object, 'true', 'false' or 'null')
 at [Source: java.io.StringReader@6c619e3b; line: 1, column: 2]
        at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1378)
        at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:599)
        at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:520)
        at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleUnexpectedValue(ReaderBasedJsonParser.java:1387)
        at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:678)
        at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:2834)
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2781)
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1942)
        at si.mazi.rescu.JSONUtils.getJsonObject(JSONUtils.java:64)
        ... 8 more
java.lang.RuntimeException: Problem getting JSON object
        at si.mazi.rescu.JSONUtils.getJsonObject(JSONUtils.java:68)
        at si.mazi.rescu.HttpTemplate.executeRequest(HttpTemplate.java:118)
        at si.mazi.rescu.RestInvocationHandler.invokeHttp(RestInvocationHandler.java:53)
        at si.mazi.rescu.RestInvocationHandler.invoke(RestInvocationHandler.java:48)
        at com.sun.proxy.$Proxy6.getTicker(Unknown Source)
        at com.xeiam.xchange.mtgox.v2.service.polling.MtGoxPollingMarketDataService.getTicker(MtGoxPollingMarketDataService.java:7
7)
        at org.aido.atp.PollingTickerManager.getTick(PollingTickerManager.java:56)
        at org.aido.atp.TickerManager.run(TickerManager.java:91)
        at java.lang.Thread.run(Unknown Source)
Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, St
ring, array, object, 'true', 'false' or 'null')
 at [Source: java.io.StringReader@320809b; line: 1, column: 2]
        at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1378)
        at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:599)
        at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:520)
        at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleUnexpectedValue(ReaderBasedJsonParser.java:1387)
        at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:678)
        at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:2834)
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2781)
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1942)
        at si.mazi.rescu.JSONUtils.getJsonObject(JSONUtils.java:64)
        ... 8 more
2013-06-07 09:14:50,566 ←[1;31m:←[0;39m ERROR: Caught unexpected MtGox exception, ticker manager shutting down now!. Details are l
isted below.
java.lang.RuntimeException: Problem getting JSON object
        at si.mazi.rescu.JSONUtils.getJsonObject(JSONUtils.java:68)
        at si.mazi.rescu.HttpTemplate.executeRequest(HttpTemplate.java:118)
        at si.mazi.rescu.RestInvocationHandler.invokeHttp(RestInvocationHandler.java:53)
        at si.mazi.rescu.RestInvocationHandler.invoke(RestInvocationHandler.java:48)
        at com.sun.proxy.$Proxy6.getTicker(Unknown Source)
        at com.xeiam.xchange.mtgox.v2.service.polling.MtGoxPollingMarketDataService.getTicker(MtGoxPollingMarketDataService.java:7
7)
        at org.aido.atp.PollingTickerManager.getTick(PollingTickerManager.java:56)
        at org.aido.atp.TickerManager.run(TickerManager.java:91)
        at java.lang.Thread.run(Unknown Source)
Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, St
ring, array, object, 'true', 'false' or 'null')
 at [Source: java.io.StringReader@47140a02; line: 1, column: 2]
        at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1378)
        at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:599)
        at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:520)
        at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleUnexpectedValue(ReaderBasedJsonParser.java:1387)
        at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:678)
        at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:2834)
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2781)
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1942)
        at si.mazi.rescu.JSONUtils.getJsonObject(JSONUtils.java:64)
        ... 8 more
2013-06-07 09:16:02,486 ←[1;31m:←[0;39m Error unmarshalling from json:
502 Bad Gateway

502 Bad Gateway



cloudflare-nginx










2013-06-07 09:16:02,490 ←[1;31m:←[0;39m ERROR: Caught unexpected MtGox exception, ticker manager shutting down now!. Details are l
isted below.
java.lang.RuntimeException: Problem getting JSON object
        at si.mazi.rescu.JSONUtils.getJsonObject(JSONUtils.java:68)
        at si.mazi.rescu.HttpTemplate.executeRequest(HttpTemplate.java:118)
        at si.mazi.rescu.RestInvocationHandler.invokeHttp(RestInvocationHandler.java:53)
        at si.mazi.rescu.RestInvocationHandler.invoke(RestInvocationHandler.java:48)
        at com.sun.proxy.$Proxy6.getTicker(Unknown Source)
        at com.xeiam.xchange.mtgox.v2.service.polling.MtGoxPollingMarketDataService.getTicker(MtGoxPollingMarketDataService.java:7
7)
        at org.aido.atp.PollingTickerManager.getTick(PollingTickerManager.java:56)
        at org.aido.atp.TickerManager.run(TickerManager.java:91)
        at java.lang.Thread.run(Unknown Source)
Caused by: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, St
ring, array, object, 'true', 'false' or 'null')
 at [Source: java.io.StringReader@7beefe14; line: 1, column: 2]
        at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1378)
        at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:599)
        at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:520)
        at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleUnexpectedValue(ReaderBasedJsonParser.java:1387)
        at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:678)
        at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:2834)
        at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2781)
        at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1942)
        at si.mazi.rescu.JSONUtils.getJsonObject(JSONUtils.java:64)
        ... 8 more
newbie
Activity: 40
Merit: 0
June 05, 2013, 11:23:01 PM
#83
Has anyone created a script to pull data from the .log file for graphing/trending/backtesting?

I am working on an excel sheet (I'm a lousy coder), but automating the mining from the log is too timeconsuming to bother with.

sr. member
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
June 05, 2013, 04:26:10 PM
#82
I'll let the code answer this:

https://github.com/aido/AidoATP/blob/master/src/main/java/org/aido/atp/TrendTradingAgent.java#L267

Code:
if (currentBid.isGreaterThan(vwap)) {
tradeIndicator.put("VWAPCross_Up",true);
} else if (currentAsk.isLessThan(vwap)) {
tradeIndicator.put("VWAPCross_Down",true);
}

So, VWAPCross_Up is true when last price > VWAP (i.e. current price has crossed up above VWAP, up trend) and VWAPCross_Down is true when last price < VWAP (i.e. current price has crossed down below VWAP, down trend).

Maybe Probably my choice of terms 'up' and 'down' was not the best.

The VWAP Cross indicator should probably be used in tandem with one of the other indicators.

Although, looking at the code now my description in the README isn't quite accurate. It uses current bid and current ask instead of last; a slight difference.
hero member
Activity: 981
Merit: 500
DIV - Your "Virtual Life" Secured and Decentralize
June 05, 2013, 04:19:38 PM
#81
Market direction is what the up or down refer to or at least it is what it seems like to me
member
Activity: 85
Merit: 10
June 05, 2013, 02:45:15 PM
#80
Yes but it was the definitions of VWAPCross_Up and VWAPCross_Down that was confusing. What ARE they? The Investopedia article doesn't reference those terms.

From the readme:

Code:
Volume Participation algorithm (VWAP Cross)

The trend observer functionality constantly monitors the market for trends. A combination of the Advance/Decline Spread, SMA and EMA algorithms decide what way the market is trending.

Market Trending Down = Look at buying
Market Trending Up = Look at selling
Once it is decided the trend is up (ask) or down (bid) it then compares the last transaction to the VWAP.

The ratio of last price versus VWAP is used as a waterline to make the final determination that we will take an action.

If trend = down & last < VWAP then buy
If trend = up & last > VWAP then sell

So what IS it? Does VWAPCross_Up mean? What does the "up" refer to? Could it be:

1. A combination of Advance/Decline Spread, SMA and EMA algorithms which suggest the market is trending up?
1a. ADS up, SMA and EMA down
1b. ADS up, SMA up, EMA up
2. Trend = down & Last < VWAP (meaning VWAP crossing UP above Last)
3. Trend = up & Last > VWAP (meaning Last crossing UP above VWAP)
4. Last < VWAP? Meaning you'll need to add the trend up parameter to your ask/bid logic
5. Last > VWAP? Meaning you'll need to add the trend up parameter to your ask/bid logic

Sorry for confusing everyone!

Alternatively just tell me what to put where for the ask/bid logic and I'll shut up Grin

hero member
Activity: 981
Merit: 500
DIV - Your "Virtual Life" Secured and Decentralize
June 05, 2013, 01:54:55 PM
#79
The logic is more like this:
As the market heads up you wait.
When it starts down you look at selling (Sell high).
When the market stops going down and starts going up you look at buying
Buy Low.
It could work the opposite way too market starts heading down. When it changes to up look at buying. When that trend reverses and market starts down look at selling.
sr. member
Activity: 248
Merit: 252
1. Collect underpants 2. ? 3. Profit
June 05, 2013, 01:38:10 PM
#78
You are all confusing me now  Huh

This may explain it better than I can:

http://www.investopedia.com/terms/v/vwap-cross.asp

member
Activity: 85
Merit: 10
June 05, 2013, 10:56:06 AM
#77
No problem! It took me absolutely ages to work it out. It goes against the typical mentality of "Buy low, sell high". The readme basically says "when the market is falling, buy and when the market is rising, sell". Which also doesn't make sense.

After reading the readme for ages and doing some further reading, I think:

"Market trending up" means the last price is higher than the VWAP, so you sell.
"Market trending down" means  the last price is lower than the VWAP, so you buy.
"Market trending flat" means last price is equal to the VWAP, so you don't do anything.

I think this is because the price always tends towards the VWAP, so as the last price oscillates above and below it the VWAP cross attempts to take advantage of that.

I have no idea though, this is just a guess.
newbie
Activity: 40
Merit: 0
June 05, 2013, 09:46:12 AM
#76
Well don't I feel silly!

That might do the trick - running now.
Pages:
Jump to: