Model OptionWorths2
This model records the worth of each investment option.
The following information is tracked:
- Invested amount (fluctuates with stock prices)
- Cash amount (affected by various events)
- Ownership shares of donations in the option (stored in partitioned details)
- Unentered donations (not yet part of the option’s worth, but needed for some conversion day events)
Each option is structured as follows:
Donation details are indexed by donation id and structured as follows:
Events
The OptionWorths2 model is affected by the following
events:
DONA_NEWDONA_CANCELMETA_NEW_OPTIONCONV_ENTERCONV_INVESTCONV_LIQUIDATECONV_EXITCONV_INCREASE_CASHCONV_INFLATIONPRICE_INFO
DONA_NEW
A new donation is added to the
UnenteredDonations collection of the relevant investment
option.
DONA_CANCEL
A cancelled donation is removed from either the
UnenteredDonations collection or the
DonationFractions fraction
set.
META_NEW_OPTION
Registers a new option with no linked donations and zero invested and cash amounts.
CONV_ENTER
This mega event checks
UnenteredDonations for donations with an
ExecuteTimestamp earlier than the event’s timestamp. These
donations are moved from UnenteredDonations and assigned an
ownership share in the investment option. The
total amount of these donations is transferred into the cash part of the
option.
CONV_INVEST
Indicates an investment has been made, transferring cash to the
invested part of the option. No change in donation details or
UnenteredDonations.
CONV_LIQUIDATE
Indicates a liquidation of stocks, transferring part of the invested amount to cash.
CONV_EXIT
Indicates withdrawal of funds for payout to charities. Only affects the cash part of the option.
Assumption:
CONV_EXITalways immediately follows aCONV_LIQUIDATE, assuming no stock price change in between.Consequence: If no liquidation is needed for an exit, a 0 amount liquidation must be added to set the invested amount to the correct value.
CONV_INFLATION
Inflation correction events contain stock pricing information and affect the option’s total worth.
CONV_INCREASE_CASH
Investment costs may be covered by a third party, increasing the cash part of the option. Only the cash part is affected.
PRICE_INFO
Adds stock pricing information to the event stream and affects the option’s total worth. Both invested and cash parts are present and used to update the model.
Usage
This model is used by the IdealOptionValuations
model, which depends on the worth of investment options.
By J.W. Morsink