ghostfolio / ghostfolio Goto Github PK
View Code? Open in Web Editor NEWOpen Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript π€
Home Page: https://Ghostfol.io
License: GNU Affero General Public License v3.0
Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript π€
Home Page: https://Ghostfol.io
License: GNU Affero General Public License v3.0
CacheModule
-> imports too many modulesInfoModule
-> imports too many modulesDataGatheringModule
-> exports DataEnhancerModule
(good practice?)Is there also an idea / implementation regarding dividend payment that can be registered ?
The BTCUSD
transaction should show up
Steps to reproduce
Expected behaviour
Current behaviour
Notes:
When I add stock with price "0" overview does not load and console spits out errors:
ghostfolio_1 | [Nest] 1 - 12/07/2021, 5:03:29 PM ERROR [ExceptionsHandler] [big.js] Division by zero
ghostfolio_1 | Error: [big.js] Division by zero
ghostfolio_1 | at Big.P.div (/ghostfolio/apps/api/node_modules/big.js/big.js:356:13)
ghostfolio_1 | at PortfolioCalculator.<anonymous> (/ghostfolio/apps/api/main.js:3735:62)
ghostfolio_1 | at Generator.next (<anonymous>)
ghostfolio_1 | at fulfilled (/ghostfolio/apps/api/node_modules/tslib/tslib.js:114:62)
ghostfolio_1 | at runNextTicks (internal/process/task_queues.js:60:5)
ghostfolio_1 | at processImmediate (internal/timers.js:437:9)
Running in docker built from v1.86.0 tag.
Hey guys, how is it going?
First of all, I wanted to say thanks for your hard work put on this app, it's awesome that we have something this good as an open-source project.
In Brazil we have a very cool app called Kinvo, which I'm moving from to Ghostfolio now.
This app has some cool features that I wanted to share with you to get your feedback on and, if it's cool enough, put in the roadmap for future releases.
I want contribute to the project, mainly on the back-end side because it's were I'm more proficient on.
Ghostfolio gives us a very cool and easy way of seeing how much our investments give us in return, both in currency and in percentage values, but sometimes the investments we make isn't beating inflation and this is a super important factor when investing.
Here's a screenshot of Kinvo's page about Profit:
On the right we can see the Profit/Loss in a easy way with circles for Real income (% Real) and for Nominal income (% Total), and we can select the timeframe for this (since the beginning, year-to-date, 1 year, 2 years, 3 years, 5 years, and 10 years).
This feature is powerful for seeing if our investments are in the right direction, and I think we could add this to Ghostfolio.
I'm not sure exactly where we can add some form of visualisation (maybe on the first page with the graph and/or in the Summary), but, as Ghostfolio is used internationally, I think we could have a set of predefined inflation indexes for each currency - with a default one for each currency - and then the user could choose in the settings which index he/she wants to use to compare its portfolio against.
This would address cases where a currency has multiple inflation indexes (for example in Brazil we have IPCA and IGPM).
Now we can see the asset classes based on asset type, but sometimes we want to visualize our portfolio in different ways.
For example, maybe we want to have different allocation categories for different stocks (differing Growth and Value for example).
Or even have different categories for Stocks and ETFs.
And, as we have these classes, we want to see the weight of each asset inside the class in percentage.
For example, having Stock A and Stock B inside Class X, we want to see that Stock A represents 87% of Class X, and Stock B represents the remaining 13%.
And we could generate graphs and information for each group.
For example, Kinvo's page about stocks:
We have a profit/loss graph by month (whole class and by each stock), nominal value (Saldo Bruto), invested value (Valor Aplicado), result in currency, result in percentage, dividends in currency (Proventos), and Yield on Cost).
Right below we have a list with each stock, allocation percentages, dividends by type (Proventos por Tipo), stock by sector (Por Setor/Subsetor), and all of the operations made in each stock.
Again, in Kinvo's page about Profit:
In the middle we can see the Profit/Loss per day (% por dia), per moth (% por mΓͺs), and per year (% por ano), which can be compared to the inflation graph (Inflação IPCA), as well as IBOV and CDI.
We could even expand this and have this comparisons against each asset class, so we could compare our american stocks portfolio against S&P500, our british stocks portfolio against FTSE 100, and our fixed income portfolio against CPI.
I think this could be customised by the user, so he/she can compare any asset class to any index he/she wants.
These are some ideas and inspirations of features we can add to this awesome app.
What do you guys think?
I'm trying to build newest releases from 1.87.0 and 1.88.0 with docker-compose -f docker/docker-compose-build-local.yml build, but I get the following error message:
Step 25/30 : RUN yarn database:generate-typings
---> Running in 71b1bcd376f0
yarn run v1.22.15
$ prisma generate
/bin/sh: prisma: not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The command '/bin/sh -c yarn database:generate-typings' returned a non-zero code: 127
ERROR: Service 'ghostfolio' failed to build : Build failed
I'm now on 1.83.0.
Hey! On my local setup, the watch:server
yarn script doesn't seem to work properly.
With nx build api --watch
, the client side app cannot connect to the servier. Updating this to nx serve api --watch
, which I took from nx docs, seems to fix it.
Is it something I'm doing wrong?
Hi @dtslvr, not sure if this helps but I noticed another performance inconsistency, this time in the Summary tab. With a time in the market of 5 months for a simulated portfolio, I get:
I assume this once again stems from the use of TWR, with some positions in the simulated portfolio opened just a few days ago at the "dip" preceding the recent swift recovery.
Originally posted by @FedericoComoglio in #554 (comment)
Would it be possible to add ability to limit overview to show data from one account only? I have one account with free stocks and it messes up overview of my "real" investments.
I'm trying to import all of my historical data and I have a stock from a company that no longer exists (it was bought by another company). When I try to add that stock to my portfolio, it does not show up in the list of securities and I can't import it.
Example: I used to have HSE.TO (Husky Energy) which was bought out by CVE.TO this year, but I can't add HSE to my portfolio since that stock no longer exists.
Adding or editing an transaction will spit out following error for every day between now and date of the transaction. I have multiple transactions with the same date not sure if it was happening before I added them or not.
postgres_1 | 2021-12-07 17:09:03.719 UTC [43] ERROR: duplicate key value violates unique constraint "MarketData.date_symbol_unique"
postgres_1 | 2021-12-07 17:09:03.719 UTC [43] DETAIL: Key (date, symbol)=(2021-12-06 00:00:00, VTI) already exists.
postgres_1 | 2021-12-07 17:09:03.719 UTC [43] STATEMENT: INSERT INTO "public"."MarketData" ("createdAt","dataSource","date","id","symbol","marketPrice") VALUES ($1,$2,$3,$4,$5,$6) RETURNING "public"."MarketData"."date", `"public"."MarketData"."symbol"
Running in docker built from v1.86.0 tag.
Setup chartjs-plugin-datalabels and use it in PortfolioProportionChartComponent
with alignment
: end
.
Probably this only works on desktop, therefore pass the deviceType
as an input to PortfolioProportionChartComponent
(see here for an example).
Demo: https://chartjs-plugin-datalabels.netlify.app/samples/advanced/multiple-labels.html
Hi, my preference would be to have the fee included in the calculations/charts. Short of that, it'd also work to have it as an option that people can switch on and off.
Happy to look into implementing that, if you can assist me with some pointers.
Hi @dtslvr, just trying out Ghostfolio and at first glance I must say it looks fantastic. Very well designed and great UX. Thank you for your work and making it open source.
I have an issue (hosted version) with the stock ticker options not always showing up. Sometimes I type part of it and it gets autocompleted, sometimes it does not The issue is that when I don't select one of the options, even if the text is the same (say, APC.F), it won't let me save the transaction.
Hi all,
I'm currently trying to setup a ghostfolio instance behind traefik v2.
Unfortunately I doesn't work as expected.
I did follow the instructions in the README and everything starts up just fine with the DB populated and ghostfolio accessibel via my domain.
BUT when I try to login with the provided secret for the Admin user I just get the message:
"Oops! Incorrect Security Token."
and on the top left another one saying:
"This feature requires a subscription - Upgrade Plan".
So I thought "Ok I'm creating a user myself and assign it the ADMIN role in the database".
That didn't work as expected either.
When I click on "Get Started" > "Create Account" I get the popup with the generated Security Token and after agreeing to that the user gets created in the database.
BUT when I try to login with that user then I get the same messages mentioned above when I try to login with the provided Admin from the README.
In fact I get those messages every time when I try to login with any account I create.
I guess the reverse-proxy fucked up the api-calls somehow as I do get a 401 unathorized when trying to login and ghostfolio sending that request in the Firefox Developer Tools:
GET https://ghostfolio.mydomain.org/api/user
I would provide you with the logs though right now I think that doesn't make any sense as there are no errors present besides that one in Firefox.
If there is a way to adjust log-level to DEBUG/INFO somehow?
Thanks in advance for any ideas you may have to solve this!
As a Ghostfolio administrator I would like to manage the supported currencies used for
currencies
in Property with other symbols in data gatheringHi,
I noticed the line chart in the overview stopped updating at the end of last year. There seem to be missing data points for 2022. As a consequence, the trend for the new year is simply a segment. A message ("Sorry! Our data providing partner is experiencing the hiccup") keeps appearing since the beginning of the year, too.
Thank you!
Hi,
I promised to report a few inconsistencies that I noticed while testing Ghostfolio functionalities. When thinking about the performance of a security, I generally think of three components:
Clearly, change/performance can be gross or net, depending on whether transaction fees are taken into account. Looking into previous issues, I noticed that recent releases of Ghostfolio indeed feature both net and gross performance (nice!). In addition, I am aware that some features -such as introducing a DIVIDEND transaction type - are in the making and cannot contribute to the issue I am reporting here. For simplicity, I also picked an example of a stock in CHF, to rule out currency effects.
Based on the attached screenshot, I would like to understand how the indicated "change" and "performance" are exactly computed (of note, the total transaction fee for this position amounts to CHF 11.35). In particular:
investment
simply refers to average buy price * quantity
(141.8 * 14)change
to be defined as (market price - average buy price) * quantity
. This would amount to (143.9-141.8) * 14 = 29.4 gross or 18.05 net (i.e. 29.4 - transaction fees).performance
to be defined as change/investment * 100
, but this is not the case. I also don't get why it is negative in spite of a positive change. Even factoring in transaction fees, that would still result in a performance of -0.42%: (2.85 - 11.35) / 1985.2 * 100Could you please clarify how are these quantities computed, and what am I missing here, in case?
Thanks a lot!
Each time when the data-gathering-7d runs it's requesting data that's already in the database
Perhaps good to have some kind of check in place if the data has already been grabbed to keep the API from being overcalled and thus restricting the download of data.
With 400 stocks, in 30 mins Ghostfolio has told me that the data couldn't be grabbed because of API overusage
I definitely love the simplicity and minimalistic design of ghostfolio (one of the main reasons, in addition to being open source + nice community that I chose it for), but in that case I think functionality trumps design.
As a separate RFC, I'd be great to be able to hover over the graph and see the standing for that particular point in time, and have the calculation at the bottom of the page update accordingly. That might, though, be too resourceful for the server and tricky to implement.. In that area, I think M1 Finance has a somewhat similar and great UI to get inspiration from :-)
I am trying to install on WSL2 Ubuntu and I get this error after trying yarn install
yarn install v1.22.11
[1/5] Validating package.json...
error [email protected]: The engine "node" is incompatible with this module. Expected version "14.x". Got "16.6.2"
error Found incompatible module.
This is odd as the requirement is 14.x and above. 16.6.2 clearly satisfies this requirement.
I'm a python guy looking to build a similar app to what you have built here. Looks awesome by the way.
The currency on the portfolio, I created a base account in USD (would like to be able to create one in another currency but only EUR and USD came up)
and then on the portfolio allocation currency chart it shows CHF in the hover text. I'm not an expert in JS (a wee beginner) or TS or angular to understand how this is being created on the back end or even shown so will just raise an issue.
Currently if I want to set my default currency I need to choose from one that is used by some transaction (as far as I can tell). Could you make it possible to select any currency? I don't actually have any transactions in my native currency but I want to see the value of my portfolio in it.
Hi,
Yuh! is a new platform launched as a joint venture between PostFinance and Swissquote. Would it be possible to add it to the list of available platforms on Ghostfolio?
Thank you!
The line chart looks a bit frazzled, especially rendered on small screens with many data points.
Decimate the data points of gf-line-chart
with Data Decimation.
completeInitialValue
should never be 0.
I don't know how to perform the 2 following steps:
Can it be explained?
Hello,
I tried running Ghostfolio with docker-compose. With defaults from .env and the Readme it works fine. But i would like to use my own Admin Access Token in the Seed as well as another Salt (ACCESS_TOKEN_SALT) . The App runs just fine and I am able to create a user with a Token. But unfortunately i have no idea what the Access Token for the Admin user is and therefore i am unable to login as Admin.
How do I find out the access token for the Admin user?
I was trying to replicate the reateAccessToken
function from the project. But I'm not getting the Token mentioned in the Readme with Inputs from the Seed and Salt from this Repo.
Opening transaction detail shows average buying price, all time performance of all transactions of this stock and total investment. While this is useful and should be accessible somehow, transaction detail should show price of the stock at the time of transaction (not average of all) and performance for this transaction only. Especially the last part is important since you might want to know single transaction performance when you are taxing sold stocks.
TLDR: data for all transaction of given stock and data of a single transaction should be two separate screens.
One of the areas that's missing is the total current value of an investment on the Holdings screen. Here's a way to show it without overcrowding it:
Logo is optional, though I kinda like the more visual effect :-) It's a bit motivating also to see the logos of the companies you've put your money in π
Happy to take a look into implementing this... though not sure what API ghostfolio is using behind the scenes and if there's an easy way to grab the logo
See here for more details: https://blog.nrwl.io/platform-upgrades-for-angular-v13-nestjs-8-next-js-12-and-more-in-nx-13-2-64218e5673fd
β Setup Storybook for Ghostfolio.
Add stories for components.
I see that it's supposed to have the functionality by #387 but I can't find how to do it.
I have tried the online version, it has a few currencies, but it doesn't have CAD. I've tried a local version, it has only EUR and USD and I can't find any place where I could add any. Is there any?
I was able to specify CAD in API request manually, but it's hacky and I think something won't work. Also, it would be nice to use CAD by default for everything.
Thank you.
Hi,
while testing, I am unable to save a new (fake) transaction for ticker BRKB. I confirm the new transaction form is filled in entirely and with valid input. I did not experience this issue before for other tickers (I tested another 5 without changing anything else in the form and the save button became available). It appears to specifically affect BRKB. I can reproduce the issue both on Chrome as well as on Safari.
I really enjoyed this project, it's simple and very intuitive and the best one is that it is open source and self hosted :D
But I can't use to manage the portfolio on my country (Brazil), I don't know the technical details, but I think it'll not be so difficult to add the B3 (Bovespa and BMF) and BRL currency to the project, the stock info already is at the yahoo financial (for example PETR4).
Thanks and keep the good work :D
Is it possible to include an example CSV file for when people want to import their full portfolio into Ghostfolio ?
I did see that there's a JSON reader but couldn't find the correct values that the CSV reader requires to load the whole portfolio in
The global style is not loaded properly in Storybook: https://github.com/ghostfolio/ghostfolio/blob/main/libs/ui/.storybook/preview.js#L3
Hi,
I set up a quick'n' dirty set of scripts to allow using Ghostfolio in a headless docker environment, you can find it here.
Hopefully this can be useful, it's hackish but works :)
A typical export consists of a list of objects like this:
{
"currency": "USD",
"dataSource": "YAHOO",
"date": "2018-07-16T00:00:00.000Z",
"fee": 13.79,
"quantity": 1,
"symbol": "AMZN",
"type": "BUY",
"unitPrice": 1823
}
Add an object validation to the ImportService
which checks the following fields:
BUY
, SELL
)Limit to maximum 20 items.
The response should either be that all items have been imported (200 OK
) or a little report of which items would fail (400 BAD REQUEST
).
Hey guys!
I was trying to insert some transactions on Uniswap but the API seems to not find the symbol.
Here's a screenshot for the console:
When trying to find directly on Yahoo Finance (https://finance.yahoo.com/quote/UNI3-USD/) there's a hyphen on the URL - maybe that's the problem.
Define an input property (@Input() isAnimated: boolean
) in GfLineChartModule which animates the line chart.
Resource: https://www.chartjs.org/docs/next/samples/animations/progressive-line.html
I am trying to follow the setup steps in the README. However, as I have only basic knowledge of docker(-compose) and PostgreSQL, I was not able to do the "Finalization" steps (namely accessing the database).
In issue #635 basically the same question is raised but when I follow the steps of the answer I get the following error when doing docker-compose exec postgres psql -U user
in the docker
directory:
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: database "user" does not exist
What am I missing?
On server startup, the following warnings appear in the log:
WARNING in ./libs/common/src/lib/types/index.ts 6:0-92
"export 'AccessWithGranteeUser' was not found in './access-with-grantee-user.type'
WARNING in ./libs/common/src/lib/types/index.ts 6:0-92
"export 'DateRange' was not found in './date-range.type'
WARNING in ./libs/common/src/lib/types/index.ts 6:0-92
"export 'Granularity' was not found in './granularity.type'
WARNING in ./libs/common/src/lib/types/index.ts 6:0-92
"export 'OrderWithAccount' was not found in './order-with-account.type'
WARNING in ./libs/common/src/lib/types/index.ts 6:0-92
"export 'RequestWithUser' was not found in './request-with-user.type'
Securities listed at the LSE are priced in pence, but ghostfolio interprets the value as pounds. This leads to some extraordinarily profitable trades in my portfolio (+12000%)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.