wealthfolio icon indicating copy to clipboard operation
wealthfolio copied to clipboard

Trouble entering a trade for a specific stock

Open sosonis opened this issue 10 months ago • 8 comments

It seems the app has an issue with the ticker of Regeneron Pharmaceuticals ($REGN). Even though I find the ticker via the lookup function, after I enter the trade I get the following warning and the valuation on the portfolio for this specific security is $0.

Image

If I try to edit the trade, I get the same error.

sosonis avatar Feb 14 '25 16:02 sosonis

I have the same issue when trying to add/edit a buy activity for AGGU.L. My portfolio currency and asset currency are different, if that helps.

When I try to view the securities page for that asset, no data is available, meaning market value=0, and my portfolio value is reduced by the amount invested.

orang-pegasus avatar Feb 14 '25 20:02 orang-pegasus

I temporarily resolved this for my requirements by editing app.db, but this does not seem like a long term fix:

UPDATE `assets` SET `currency` = ? WHERE `rowid` IS ? AND `currency` IS ?, ('USD', 2, '')
UPDATE `assets` SET `data_source` = ? WHERE `rowid` IS ? AND `data_source` IS ?, ('Yahoo', 2, 'YAHOO')

orang-pegasus avatar Feb 15 '25 04:02 orang-pegasus

Same issue, same Yahoo error here with a certain ETF. Currencies are all the same for the account and the asset (EUR) by the way.

pilsetnieks avatar Feb 27 '25 14:02 pilsetnieks

I wonder what is causing this problem and why it is happening with few tickers. @orang-pegasus how did you edit the app.db file?

sosonis avatar Feb 28 '25 18:02 sosonis

@sosonis on Mac, this is ~/Library/com.teymz.wealthfolio/app.db. Make sure to backup the file before making any edits. It is a sqlite file, you can use any editor you prefer, but I used the SQLite3 Editor extension in VSCode.

orang-pegasus avatar Mar 02 '25 04:03 orang-pegasus

I temporarily resolved this for my requirements by editing app.db, but this does not seem like a long term fix:

UPDATE `assets` SET `currency` = ? WHERE `rowid` IS ? AND `currency` IS ?, ('USD', 2, '')
UPDATE `assets` SET `data_source` = ? WHERE `rowid` IS ? AND `data_source` IS ?, ('Yahoo', 2, 'YAHOO')

Thanks! This method worked perfectly. After updating the currency and data_source fields in the assets table with the correct values, the calculations were accurate upon restart. However, the underlying cause of this bug is still unclear.

kaihg avatar Mar 03 '25 14:03 kaihg

@sosonis on Mac, this is ~/Library/com.teymz.wealthfolio/app.db. Make sure to backup the file before making any edits. It is a sqlite file, you can use any editor you prefer, but I used the SQLite3 Editor extension in VSCode.

Thank you for the information. I eventually opened the assets table and noticed that REGN and btw ULTA too from the shares I own/owned, had NULL entries on the currency, countries, sectors fields, the asset_sub_class was entered as "Equity" while all other securities were filed as "Stock" (so I changed that as well) and finally the data_source was filed as "YAHOO" while all other entries are file as "Yahoo" and I changed that too.

After those changes, the valuation of REGN shares was fixed.

sosonis avatar Mar 04 '25 00:03 sosonis

I temporarily resolved this for my requirements by editing app.db, but this does not seem like a long term fix:

UPDATE `assets` SET `currency` = ? WHERE `rowid` IS ? AND `currency` IS ?, ('USD', 2, '')
UPDATE `assets` SET `data_source` = ? WHERE `rowid` IS ? AND `data_source` IS ?, ('Yahoo', 2, 'YAHOO')

Thanks! This method worked perfectly. After updating the currency and data_source fields in the assets table with the correct values, the calculations were accurate upon restart. However, the underlying cause of this bug is still unclear.

It save my data, thanks for the solution.

larryjclai avatar Apr 10 '25 14:04 larryjclai