My 401k plan applies the 'Mega Back Door' Roth conversion for me automatically.
This means that I have something like the following in my input file:
2020-02-04 * "CONTRIBUTION - AFTER TAX POST"
Income:Salary -5000 USD
Assets:Investments:401k:PostTax:VFFSX 50 VFFSX {100 USD}
2020-02-04 * "Transfers - AFTER TAX POST - ROTH IN-PLAN CONVERSION"
Assets:Investments:401k:PostTax:VFFSX 50 VFFSX {}
Assets:Investments:401k:Roth:VFFSX 50 VFFSX {100 USD}
The above works fine, however, I am importing these from OFX, and the order is not guaranteed (since OFX is stored by account, if the Roth account gets read first, the order would be swapped). If the order is swapped, I get a 'no position matches' error. Also, it means I can't put these into different files, as I won't know the order they get sorted. For now I've worked around the issue by ensuring the OFX file contains full datetime timestamps with enough precision to order the transactions, and then creating a single datetime ordered list before importing into beancount. It works ok, but adds complexity to my workflow.
I thought that one of the tenants of beancount is to not care about the order of items within the input file(s). Are there any recommendations on how I should be dealing with the above case?
I tried an alternative of collapsing into a single transaction, but that also caused problems:
2020-02-04 * "CONTRIBUTION - AFTER TAX POST"
Assets:Investments:401k:PostTax:VFFSX 50 VFFSX {}
Assets:Investments:401k:Roth:VFFSX 50 VFFSX {100 USD}
Income:Salary -5000 USD
Assets:Investments:401k:PostTax:VFFSX 50 VFFSX {100 USD}
The above doesn't resolve unless I instead include the explicit cost basis, in which case it works ok. I could probably rework my workflow to find these cases and collapse them into single transactions but I'm not sure if that would make the workflow any simpler than what I'm doing now.