Giter Club home page Giter Club logo

robinhood-to-xlsx's People

Contributors

anthonyk1225 avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

robinhood-to-xlsx's Issues

Tallying P/L for expired option contracts

Hello! Hope all is well!

Right now, expired call options still shows up as "unrealized premium" in the P/L table.
Instead, expired call options should show up in the P/L column.
I haven't experimented with puts, so don't have data points for those.

Cheers!

ZeroDivisionError: division by zero

Hi,

Thank you so much for this project. Exporting to JSON presents no problems, however, when doing it to Excel I receive a ZeroDivsionError. It only happens for Orders. This was previously referenced in #12, however it's resurfaced it looks like.

Traceback (most recent call last):
  File "app.py", line 48, in <module>
    run()
  File "app.py", line 41, in run
    json_to_xlsx.run(answer)
  File "/Users/jacobwall/GitHub/robinhood-to-xlsx/controllers/json_to_xlsx.py", line 81, in run
    formula_pipelines[entity](formula_worksheet, workbook, sorted_data)
  File "/Users/jacobwall/GitHub/robinhood-to-xlsx/formulas/orders.py", line 82, in handle_formulas
    write_aggregates(worksheet, workbook, data)
  File "/Users/jacobwall/GitHub/robinhood-to-xlsx/formulas/orders.py", line 33, in write_aggregates
    aggregates = aggregate_data(data)
  File "/Users/jacobwall/GitHub/robinhood-to-xlsx/formulas/orders.py", line 23, in aggregate_data
    equity_average = aggregates[symbol]['equity'] / aggregates[symbol]['quantity']
ZeroDivisionError: division by zero

Basic usage question

  1. after running
    $ virtualenv venv
    my console shows
    (base) instead of (venv), is this an issue?

  2. When I tried to run this line
    (venv) $ touch credentials.py
    the console responds with

'touch' is not recognized as an internal or external command,
operable program or batch file.
  1. After forking, I can't find the file credentials.py in the downloaded files. Where is the file located?

Thanks in advance..

Incorrect amount of equity owned & P/L

Here comes another one.

Looking at the equity owned column, I find that some numbers are correct, and some are not. Equity owned can be incorrect even if number of shares held is correct.

Manually checking the amount of equity owned by doing some math using the info from sheet 1, I found that the numbers I manually calculate differs from the numbers shown in sheet 2. For example, here are some transactions for one company's stock I've traded. The first four transactions results in 0 shares owned. Then I made a purchase for 5 shares in the last row, this is shown correctly in sheet 1:

side quantity ---- price ---- symbol # shares bought/sold total paid
buy 5 ---- $62.50 ---- xxxx 5 312.5
sell 4 ---- $65.02 ---- xxxx -4 -260.06
buy 4 ---- $64.86 ---- xxxx 4 259.44
sell 5 ---- $64.89 ---- xxxx -5 -324.425
buy 5 ---- $136.16 ---- xxxx 5 680.8

By this information, I should have had a $12 loss, and own $680.8 of equity.

sheet 2 shows the following:

COMPANY P/L SHARES HELD EQUITY OWNED
xxxx -$220.89 5 $447.41

which shows the correct number of shares held, but incorrect P/L and equity owned.

Reconsider events being separate

Currently, events are being exported to their own excel file. These belong to things such as option orders and orders. It would be beneficial to look at what they belong to and see how to aggregate it in.

JSON to XLSX OperationalError

Authentication and JSON files download just fine. But, I receive this error when running for XLSX.

[?] What would you like to run: xlsx(Excel file)
   json(Robinhood history)
 > xlsx(Excel file)

[?] What would you like to generate?: orders
   dividends
   events
   options
 > orders
   cancel

SENDING REQUEST FOR THE INSTRUMENT URL
There was an error fetching the instrument 'OperationalError' object has no attribute 'message'
SENDING REQUEST FOR THE INSTRUMENT URL
There was an error fetching the instrument 'OperationalError' object has no attribute 'message'
Traceback (most recent call last):
  File "app.py", line 49, in <module>
    run()
  File "app.py", line 43, in run
    json_to_xlsx.run(report_answer)
  File "/Users/emilyschmader/robinhood-to-xlsx/controllers/json_to_xlsx.py", line 33, in run
    sorted_data = sorted(filtered_data, key=lambda k: k[entity_sort_on[entity]]) 
  File "/Users/emilyschmader/robinhood-to-xlsx/controllers/json_to_xlsx.py", line 33, in <lambda>
    sorted_data = sorted(filtered_data, key=lambda k: k[entity_sort_on[entity]]) 
KeyError: 'symbol'

Multi-leg trades w/ options

Right now there is only information on the option order as a whole. There are situations where there are multiple legs. Either need to somehow aggregate the information, or display it on subsequent lines within excel file.

Stock splits cause incorrect tallying

If holding options or shares of a company when a stock split or reverse stock split happens, the profit/loss on sheet 2 for options.xlsx or orders.xlsx won't be accurate for those companies.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.