ticker icon indicating copy to clipboard operation
ticker copied to clipboard

Add support for short positions in lots

Open pichalite opened this issue 4 years ago • 5 comments

Problem Statement Add support for shorted positions

Proposed Solution Short position will be identified by negative quantity in the lots. Cost of the shot position will be current price * quantity (positive). Value will be unit cost * quantity (positive).

pichalite avatar Feb 17 '21 18:02 pichalite

Thanks for the suggestion!

Do you know if this is available on Yahoo Finance? Would you be able to provide an example if so?

achannarasappa avatar Feb 19 '21 22:02 achannarasappa

@achannarasappa Don't think there is anything specific you need to get from Yahoo Finance. It's got to do with how you calculate the position values. When you short a stock, you start the position by selling the stock.

When you buy stock, the cost for the position would be quantity * unit_cost and current value would be quantity * current_price.

When you short a stock, the cost for the position would be quantity * current_price and value will be quantity * unit_cost specified in the lot. In this case, value will be constant but cost will keep changing.

pichalite avatar Feb 20 '21 00:02 pichalite

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Mar 22 '21 02:03 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Mar 30 '21 01:03 github-actions[bot]

@achannarasappa hi, would you mind re-opening this feature request issue please? I'd be interested in such a feature. As mentioned, you don't need anything from the data feeds for short positions. You just add a negative amount as your position and instead of showing a loss it would show a gain and vice versa. Pretty much just multiply by -1 to get the result. In fact it seems the arrow already seems to be pointing in the right direction, just the color is wrong. Note the attached screenshot where the arrow points up (gain) but the color is red (loss).

PS: this stale bot is such a nuisance :(

Screen Shot 2022-08-23 at 20 11 16 .

arctica avatar Aug 23 '22 18:08 arctica

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Dec 23 '22 01:12 github-actions[bot]

This issue was closed because it has been stalled for 14 days with no activity.

github-actions[bot] avatar Jan 22 '23 02:01 github-actions[bot]