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:
http://furius.ca/beancount/doc/symbology
and also this project (for irregular multipliers, e.g. in futures):
https://github.com/blais/mulmat

Enjoy,






On Sun, Sep 11, 2022 at 9:00 PM Nasko Oskov <[email protected]> wrote:

> 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
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/3c21ae95-3c71-4425-86d5-65d9173b3522n%40googlegroups.com
> <https://groups.google.com/d/msgid/beancount/3c21ae95-3c71-4425-86d5-65d9173b3522n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhOQM4%3D6fHRS%2BWDgP%3D%3DozKTtUN2CQ-ZVT0cXhTB8LdZong%40mail.gmail.com.

Reply via email to