Improved profit and loss reporting - Printable Version +- Gekko Forum (https://forum.gekko.wizb.it) +-- Forum: Gekko (https://forum.gekko.wizb.it/forum-13.html) +--- Forum: Feature Requests (https://forum.gekko.wizb.it/forum-15.html) +--- Thread: Improved profit and loss reporting (/thread-56679.html) |
Improved profit and loss reporting - Hilko - 04-08-2018 The PnL reporting in Gekko is based on 'round trips'. This is nice because it keeps things simple, but is also limiting Gekko's capabilities. To enable more advanced strategies in Gekko that can trade parts of the balance, a more flexible PnL reporting is needed. This thread is to continue the discussion of the suggested proposal here. As an example of this implementation, a stand alone cli-application is available here. What do we want PnL reporting in Gekko to look like in the future? Please share your views here, what is the best way forward? RE: Improved profit and loss reporting - askmike - 04-08-2018 To follow up on the discussion here: https://github.com/askmike/gekko/issues/2028#issuecomment-379536861 Quote:When trading, selling is just as risky as buying. The situation is symmetrical, selling one currency is the same as buying the other. The risks are that the price goes up further after you've sold, or goes down even lower after you've bought. I should make it more clear on what set of assumptions Gekko is build, but "selling one currency is the same as buying the other." is definitely not true from Gekko's perspective: how can you measure risk and exposure to some market if you consider both things on that market to be dangerous to hold? All of Gekko's risk and exposure metrics (and the whole roundtrip system) is based on the assumption (in case of BTC/USD) that USD is your benchmark and you are trying to trade BTC in order to increase the amount of USD you have, but holding USD is never risky. Yes USD can technically lose value through inflation or compared against the euro, but that's out of scope for Gekko. Quote:The risks are that the price goes up further after you've sold, or goes down even lower after you've bought. The first one is definitely not a risk, if that happens you don't lose any money. I also would never say strategies that fail to sell at the top are bad. Quote:Trading a partial balance helps mitigating this risk. It allows you to 'walk into' your position. When you've bought some and the price unexpectedly drops, you can buy some more. This brings the average price at which you bought, closer to the bottom price. Very true, I 100% agree with the benefits. I don't think we should not build this because it's a bad feature. I just think that's it is a very hard feature to properly build in a way where everyone will understand what is going on (and like how it is displayed). Quote:I have nothing fancy in mind for the interface. Simply a table for each traded currency pair as above in the OP. And maybe one overview table that shows all traded currency pairs and a summary of the result. I am not talking about complex UI elements, I think it's very hard to create one simple table that has all the information and is understandable by everyone. Note that PnL is a concept that is usually only used when doing more advanced stuff like trading on leverage or future trading. For the reason that it all of a sudden you are abstracting all your trades away into new concepts. Quote:Every trade is managed and reported as a leveraged position. Even though the leverage is 1x As soon as Gekko starts reporting 1x leverage and/or short trades while trading the spot on exchanges like bitfinex and poloniex (exchanges that offer both spot and margin trading) it's going to be extremely confusing for everyone. Also remember that leverage is very hard to grasp for new traders (the majority of people opening tickets and asking questions about gekko). RE: Improved profit and loss reporting - Hilko - 05-19-2018 A first GUI version of the PnL reporting is available for anyone interested to try out, here in this pull request. At first I made a command line version only. Soon I realized that I could not see my P&L and average open position on the go, on my mobile. So I needed to run this on my server, which requires a GUI. The backend is still a verbatim copy of the command line tool. This means the integration with the existing gekko code can be somewhat improved.
RE: Improved profit and loss reporting - Hilko - 05-20-2018 At first I had made a command line version of my PnL calculation. Soon I realized that I could not see my average open position on my mobile, on the go. So I had to run this my server, which requires a GUI. For who is interested to have a look or develop it further, it is available in my pull request here. It is essentially a verbatim copy of my command line tool, with a GUI page on top of it. This means the integration with the rest of the Gekko code can be improved.
RE: Improved profit and loss reporting - BotsEdge - 09-09-2018 (04-08-2018, 12:52 PM)askmike Wrote: To follow up on the discussion here: https://github.com/askmike/gekko/issues/2028#issuecomment-379536861 Quote:When trading, selling is just as risky as buying. The situation is symmetrical, selling one currency is the same as buying the other. The risks are that the price goes up further after you've sold, or goes down even lower after you've bought. Not completely correct. If you sell an asset empty (meaning actually going short) the price of this asset could go up without any limit whereas if you buy an asset (meaning actually going long) the price of the underlying asset can only go down to zero. So in the trading world a real short trade is considered a lot riskier than a long trade. This means that all trades have to be based on a portfolio management system, consisting of at least a risk defining procedure as well as a money management tool which defines the position size to trade next. Quote:Trading a partial balance helps mitigating this risk. It allows you to 'walk into' your position. When you've bought some and the price unexpectedly drops, you can buy some more. This brings the average price at which you bought, closer to the bottom price. This kind of thinking when trading at any market is very dangerous. It is called DCA or dollar cost averaging and a lot of the trading bot programmers especially those who actually try to sell their trading bot software are using DCA as a marketing tool. In the real trading world cost averaging on the way down will kill your portfolio at a given point in the future since it contains a deadly misconception. It assumes, that an asset falling right now will eventually recover. But in the real world it does not need to do this it can fall until it hits zero. As a high profile example from the real world take the Enron stock in the nineties or take Lehmann Brothers stock back in 2008. A lot of people thought that a huge bank like Lehmann Brothers would not stop existing so they bought even more stock when that thing was in free fall. We all know how that ended. So, yes DCA can be a tool in Gekko but it needs to be in an advanced mode and needs to carry a serious warning tag. But in general i agree that Gekko needs some kind of advanced mode where experienced traders can go and set their money management profile and their risk levels. RE: Improved profit and loss reporting - Araceli - 04-15-2019 I am not talking about complex UI elements, I think it's very hard to create one simple table that has all the information and is understandable by everyone. Note that PnL is a concept that is usually only used when doing more advanced stuff like trading on leverage or future trading best water flosser. For the reason that it all of a sudden you are abstracting all your trades away into new concepts. RE: Improved profit and loss reporting - PGTART - 09-29-2019 (09-09-2018, 10:36 PM)BotsEdge Wrote:(04-08-2018, 12:52 PM)askmike Wrote: To follow up on the discussion here: https://github.com/askmike/gekko/issues/2028#issuecomment-379536861 It would be nice to be able to create math that trades more agresivly or more carefullly when it knows it reached a portofolio of x% above its invested money. And to trade less risky when there is y% left of the investment. I think its quite benneficial to know your actual portofolio for a lot thinkering with trading math. Clear readable data is always handy |