Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Accounting for selling options contracts

180 views
Skip to first unread message

Nasko Oskov

unread,
Sep 11, 2022, 9:00:05 PM9/11/22
to Beancount
Hey folks,
Thanks a ton to everyone that has made the beancount ecosystem so awesome! I've recently started moving my finances over to it and so far I really like it.

The one scenario I'm hitting a snag with is how to track covered call options or naked puts I'm trading in one of my accounts. Both transactions are selling option contracts, therefore I need to start with a short position in time. I've tried searching for how to account for short positions and I still can't quite understand how to accomplish that. 

An example that we can use to discuss so it is more concrete - sold 1 put contract at $0.18 amounting to $17.31 after commissions and fees, which then expires worthless. Here 

2022-05-27 * "SELL PUT"
  Expenses:Investments:Fees:Fidelity:RollIRA        0.0400 USD
  Expenses:Investments:Commisions:Fidelity:RollIRA  0.6500 USD
  Assets:US:Fidelity:RollIRA:AAPL220603P135             -1 AAPL220603P135 @ 18.00 USD
  Assets:US:Fidelity:RollIRA:Cash                    17.31 USD

2022-06-03 * "EXPIRED PUT"
  Assets:US:Fidelity:RollIRA:AAPL220603P135  1 AAPL220603P135 @ 0.00 USD
  Assets:US:Fidelity:RollIRA:Cash                    0.00 USD

Any advice is appreciated.
Thanks in advance!
Nasko

Martin Blais

unread,
Sep 11, 2022, 9:37:03 PM9/11/22
to bean...@googlegroups.com
This is mighty fine:

2022-05-27 * "SELL PUT"
  Expenses:Investments:Fees:Fidelity:RollIRA        0.0400 USD
  Expenses:Investments:Commisions:Fidelity:RollIRA  0.6500 USD
  Assets:US:Fidelity:RollIRA:AAPL220603P135             -1 AAPL220603P135 {18.00 USD}

  Assets:US:Fidelity:RollIRA:Cash                    17.31 USD

2022-06-03 * "EXPIRED PUT"
  Assets:US:Fidelity:RollIRA:AAPL220603P135  1 AAPL220603P135 {} @ 0.00 USD
  Assets:US:Fidelity:RollIRA:Cash                    0.00 USD
  Income:US:Fidelity:RollIRA:Pnl:AAPL               

- I added cost basis
- I balanced the closing expiration with P/L income

Now, if you're going to do covered calls, you'll want to associate the underlying trade(s) with the various covered call positions as they expire and/or you roll them forward, because what you're ultimately doing is lowering the cost basis of your long position, and it's nice to be able to track the P/L of the entire sequence. Beancount is sufficient for that.

If you're going to do complex options trades with more complicated scenarios, I'd recommend for those to use this instead: https://github.com/beancount/johnny
I'm still working on exporting Johnny's database contents to Beancount - probably with a single transaction per trade chain.  It's easily done though, a simple conversion from a CSV file to Beancount inputs should be easy.

Another question is how to handle the 100x multiplier. I prefer to use -100 with 0.18 USD than -1 with 18.00 USD, but either way aren't great. Ideally Beancount would handle that for you (it will eventually).

You might be interested in my notes on symbology:
and also this project (for irregular multipliers, e.g. in futures):

Enjoy,






--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/3c21ae95-3c71-4425-86d5-65d9173b3522n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages