Hi Martin-

Thanks for the response- I tried that and it mostly works.

Unfortunately, encoding the strike price in the commodity means that you
need N entries in your price database for the same stock to get the value
of N different grants. I also tried setting up an equivalency of the
different commodities with the 'real' stock, but this gets back into it
reports showing that an actual amount of income, which doesn't yet exist.

What I ended up actually doing is basically what I used to do: track
estimated gross value of options in dollars. It's really what I want to
know, anyway. I wrote a short python script that does the calculation given
a list of grants and the price database, and spits out monthly records I
copy into my ledger.


Cheers
-Eric

On Thu, Dec 11, 2014 at 10:07 PM, Martin Blais <bl...@furius.ca> wrote:

> Hi Eric,
> I haven't done this myself yet (I don't have options), but I think what
> you're doing is incorrect.
>
> You're not meant to track the cost basis of unexercised options, e.g.,
> what if they vest OOM?
> I would track the cost of the option itself.
> With the method I suggest below you can just enter price values for your
> particular option as the underlying moves.
> For example, an ITM option close to expiration should converge closely to
> the payoff, so having a recent-ish database of option price values in your
> ledger should allow calculation of the cash equivalent.
>
> I had a quick shot at it below, and this is probably closer to want you
> want (assuming ESP options, which I _assume_ an employer would
> automatically report the gains for on your W-2, for each exercise during
> the year, again, I haven't actually been in that situation so I might get
> some of the particulars wrong. I read up some IRS documents online to
> figure out what I needed, as I was curious).
>
> I'd love to hear some feedback,
>
>
>
> ;; Notes:
> ;;
> ;; * I put the exercise price in the commodity name itself, e.g.,
> FOO_X100, as
> ;;   in 'X' for strike price and '100' for 100$/share. This defines the
> ;;   instrument. Put the expiration date in there as well if you feel a
> need
> ;;   to do that (use the exchange codes if it makes sense to you).
> ;;
> ;; * I track the value of the option itself, not of the exercise price.
> When
> ;;   you "use" the option by exercising it, I would track that as an
> expense
> ;;   as in the below with 'Expenses:OptionsExercises' because the option
> ;;   vanishes and it acts as a privilege token you've now used.
> ;;
>
> plugin "beancount.ops.auto_accounts"
>
> 2014-06-01 * "Stock options - acquire"
>     Assets:BorganSchmanley:FOO-X100        8 FOO-X100 {0.80 USD}
>     Income:BorganSchmanley:OptionsVesting  ;; Note: Non-taxable if
> statutory
>
> 2014-12-01 * "Stock options - exercise"
>     Assets:BorganSchmanley:FOO-X100       -4 FOO-X100 {0.80 USD} @ 120.00
> USD
>     Expenses:OptionsExercise            3.20 USD
>     Assets:BorganSchmanley:FOO             4 FOO {120.00 USD}
>     Assets:BorganSchmanley:Cash      -400.00 USD
>     Income:BorganSchmanley:Gains      -80.00 USD ;; These gains to be
> reported on W-2 AFAIK.
>
> 2014-12-01 * "Stock options - sale"
>     Assets:BorganSchmanley:FOO            -4 FOO {120.00 USD} @ 121.00 USD
>     Assets:BorganSchmanley:Cash       484.00 USD
>     Income:BorganSchmanley:Gains       -4.00 USD
>
>
> ;; In my sale example above, I assume you waited a bit before selling after
> ;; exercise and got a small gain/loss from it. If you did not and you sold
> at
> ;; 120.00 (same as FMV at exercise) then you would have a gain or zero.
> ;;
> ;; If you wanted to represent an exercise + sell in one transaction, you
> could
> ;; do it this way, without the stock, you'd just get the money:
>
> 2014-12-15 * "Stock options - exercise & auto-sale"
>     Assets:BorganSchmanley:FOO-X100       -4 FOO-X100 {0.80 USD} @ 120.00
> USD
>     Expenses:OptionsExercise            3.20 USD
>     Assets:BorganSchmanley:Cash        80.00 USD
>     Income:BorganSchmanley:Gains      -80.00 USD ;; These gains to be
> reported on W-2 AFAIK.
>
>
>
>
>
> On Tue, Dec 9, 2014 at 11:40 PM, Eric Weigle <eric.wei...@gmail.com>
> wrote:
>
>> I'm trying to figure out how to model stock options in ledger. My goals
>> are that
>>   (1) individual lots are tracked separately by the grant price, and
>>   (2) I can track the potential value in a sane way.
>>
>> This seems to work for (1) when I exercise for cash:
>>
>> 2014/06/01 Stock options - acquire
>>     Assets:Stock Options:Foo       4 FOO_OPTIONS {$100} @ $0
>>
>> 2014/12/01 Stock options - exercise
>>     Assets:Stock Options:Foo      -4 FOO_OPTIONS {$100} @ $0
>>     Assets:Stock:Foo               4 FOO @ $100
>>     Income:Transient Stock    $-400
>>
>> 2014/12/01 Stock options - sale
>>     Assets:Stock:Foo          -4 FOO {$100} @ $200
>>     Income:Capital Gains      $-400
>>     Income:Transient Stock    $400
>>     Assets:Checking           $400
>>
>> But I can't seem to figure out a way to track what the exercise would be
>> worth at, say, August in my example. I tried adding  a pricesdb value
>> for FOO_OPTIONS of $150, but then it thinks I have $600 rather than $200,
>> because it doesn't account for the $100 exercise price. All the transaction
>> variants I've tried for FOO_OPTIONS {$} "rebase" the option, which is not
>> what I'm hoping to do.
>>
>> I'm coming from Gnucash. What I did there was to track an account "Stock
>> options" in dollars, and just do "change in value" transactions monthly.
>> This achieved #2, but not #1.
>>
>> Any suggestions appreciated. Maybe some magic with virtual transactions
>> to track #1 and #2 separately?
>>
>>
>> Thanks
>> -Eric
>>
>> --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Ledger" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to ledger-cli+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Ledger" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ledger-cli+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to