You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The next important features to be included in the backend are:
1 - Consider the extra costs in the Stock Wallet calculation.
The value assigned as extra cost is considered "wasted" and should be considered when calculating the current profit the user can make from their transactions. Basically, it's supposed to be added to the bought price of the income transactions, as if they were more expensive than they actually were.
In the same way, it should be subtracted from the sold price in outcome transactions, as if they were worth less than what they actually were sold for.
This calculation should probably be made separately in the Mongo pipeline aggregation query and then added (or subtracted) at the end from the total values.
2 - Make it possible to show the current already accomplished profit (or loss) the user made from a given stock.
This should be fairly easy and it should be given by the formula:
total value from all outcome transactions - (MINUS) total number of shares for all outcome transactionsXaverage bought price for all income transactions
The product is basically all the money invested to buy all those shares that were sold. Then you subtract that from the total recieved value for all the sold shares.
P.S.: It is very important to remember the extra costs here. They should absolutely be considered in this calculation.
The text was updated successfully, but these errors were encountered:
The next important features to be included in the backend are:
The value assigned as extra cost is considered "wasted" and should be considered when calculating the current profit the user can make from their transactions. Basically, it's supposed to be added to the bought price of the
income
transactions, as if they were more expensive than they actually were.In the same way, it should be subtracted from the sold price in
outcome
transactions, as if they were worth less than what they actually were sold for.This calculation should probably be made separately in the Mongo pipeline aggregation query and then added (or subtracted) at the end from the total values.
This should be fairly easy and it should be given by the formula:
total value from all outcome transactions
- (MINUS)
total number of shares for all outcome transactions X average bought price for all income transactions
The product is basically all the money invested to buy all those shares that were sold. Then you subtract that from the total recieved value for all the sold shares.
P.S.: It is very important to remember the extra costs here. They should absolutely be considered in this calculation.
The text was updated successfully, but these errors were encountered: