Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

PnL Reporting UI #2173

Closed
wants to merge 22 commits into from
Closed

PnL Reporting UI #2173

wants to merge 22 commits into from

Conversation

hilkoc
Copy link
Contributor

@hilkoc hilkoc commented May 13, 2018

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    This pull request adds a new tab to the Gekko UI for PnL reporting. Details in this issue Improved PnL reporting #2028
    The PnL page looks like this:
    gekkopnl

  • What is the new behavior (if this is a feature change)?
    Backend code fetches all (new) trades from the exchange and stores them in sqlite database.
    In the UI, all new trades since the last sync with the exchange are shown.

For each buy trade it shows how much your current position and average open price changed.

For each sell trade it shows how much was gained (take profit) or lost (stop loss).

Below the trade level breakdown is an overview of all positions for all traded currency pairs. For each it is shown how much is invested at what average opening price and how much the PnL is, in term currency and relative as percentage.

@askmike
Copy link
Owner

askmike commented May 18, 2018

Hey! Apologies for the delay.

I love this PR, few things:

  • I am working on a major exchange overhaul, you can find the details here: [WIP] Gekko broker #2118. There is a lot of overlap between what you want and what is happening there. Mostly: Do we really need more glue code between exchanges and Gekko or can we re use the existing exchange interface? (in that PR I am improving that interface). To calculate PnL you only need to get details on trades you did (price, amount, fee, date, etc right)? Gekko already has func for that.
  • I love how ambitious you are in getting this extremely complex behaviour added to Gekko, however I do plan to roll out more advanced order execution a bit more phased (starting with Gekko Broker) and it will take a while before it can hit any UI. Apologies on my end on not being very responsive in your excellent issue Improved PnL reporting #2028 and the forum (can you please post the link here again?)

@askmike
Copy link
Owner

askmike commented May 18, 2018

I propose to talk about future features on the forum and actuall implementation details here. As such I first like to talk on the forum post you created for this topic.

@hilkoc
Copy link
Contributor Author

hilkoc commented May 19, 2018

This PR as it is now can be merged into the develop branch, so others can benefit from this, have a look and improve it further.
It may need some more work though before it goes into a stable release. I admit it is not well integrated with existing gekko code for interfacing with exchanges and managing API keys.

I'll say more about this on the forum https://forum.gekko.wizb.it/thread-56679.html . For now this is just first version that works and can do something useful, which I'd like to share for the benefit of others.

@stale
Copy link

stale bot commented Jan 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you feel this is very a important issue please reach out the maintainer of this project directly via e-mail: gekko at mvr dot me.

@stale stale bot added the wontfix label Jan 13, 2019
@stale stale bot closed this Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants