DEIMOS-datastructure2

MainList: MainList houses all data and is the means of data transfer between functions.

MainList$AccountList: AccountList houses the names of the different types of investment accounts. The investment account types are grouped into arrays by umbrella categories. For instance, “40X” holds pre-tax retirement accounts and “Brokerage” holds brokerage accounts. The first entry in the umbrella array is the name of the umbrella category and each subsequent entry represents an account type falling within the umbrella category. 
Example: MainList$AccountList$40X might contain the following elements: “40X” “401a” “403b” “401k” 

MainList$BankList: Contains a list of banks/investment institutions that house checking/savings accounts or cash accounts for the investment institutions. It is made up of sublists with the first entry being the full name of the institution followed by abbreviations used. For example: MainList$BankList$Ally might contain the following elements: “Ally Bank” “Ally”

MainList$BCBList: BCB stands for Banks, Cash, and Bonds. The BCBList is a list of dataframes that hold data for checking accounts, savings accounts, credit cards, bonds, investment cash accounts, and assets. Standard naming is used for the dataframes depending on the account type.
Examples:
Checking/Savings: BankAbbreviation_Last4ofAcctNumber: Chase_7438
Investment Cash Account: InstitutionAbbreviation_AccountType_Cash_Last4ofAcctNumber: Fid_Brok_Cash_1243

MainList$CashList: The CashList contains sublists of account types in the BCBList that should be counted as cash for calculation purposes. The first entry is the category name followed by a listing of each account type. 
Example: MainList$CashList$Cash might contain: “Cash” “Checking” “Savings” “Brokerage”

MainList$CCTypes: CCTypes is an array that contains different types of credit card types
Example: MainList$CCTypes might contain: “American Express” “Discover” “Mastercard” “Visa”

MainList$CCBanks: CCBanks is a list of arrays that hold the names of banks backing credit cards. Each entry contains the full name of the bank in the first position and an abbreviation in the second position.
Example: MainList$CCBanks$AmEx might contain “American Express” “Amex”. MainList$CCBanks$Chase might include “Chase” “Chase”

MainList$Indices: MainList$Indices is a dataframe containing a list of stock indices and their symbols. This is generally used to present index values when the program loads.
Example: MainList$Indices[1,1] might be “S&P 500” “^GSPC”

MainList$InstitutionList: MainList$InstitutionList is a list of arrays containing data pertaining to investment institutions. Each array houses the full name of the institution followed by subinstitution abbreviations. Subinstitutions are used to keep different accounts at the same institution separate (if desired). For instance, if Bob and Alice both had accounts at Vanguard, VanB might be used for Bob’s account and VanA might be used for Alice’s account.
Example: MainList$InstitutionList$Vanguard might contain: “Vanguard” “VanB” “VanA”

MainList$NetWorthDF: MainList$NetWorthDF is a dataframe containing net worth information. The user can choose to make a net worth calculation from the main menu, at which point a new entry is added to MainList$NetWorthDF. 

MainList$Portfolio: MainList$Portfolio is a list of dataframes, with each dataframe corresponding to an equity holding. The dataframes are named as such: Equity Symbol.Subinstitution.AccountType_Value. For example, if Apple stock were held in Bob’s Vanguard brokerage account, it would be named: AAPL.VanB.Brok_Value. If Coca Cola were held in Alice’s Fidelity 401k account, it would be KO.FidA.401k_Value.
Each time the portfolio is updated (from the main menu), a new entry is made in the equity dataframe, which includes the current price of the equity, the number of shares (acquired from the Transactions list), and the total value of the holding.

MainList$SkipList: MainList$SkipList is an array of accounts that can be skipped when updating the TransactionList. Example entries might include: 401k_Trans or 403b_Trans. This is primarily useful when transactions are being imported to the program rather than being manually entered. Accounts identified in the SkipList are not presented for manual update.

MainList$SoldTransactions: When the complete position of a holding is sold, the transaction dataframe for that holding is moved from MainList$Transactions to MainList$SoldTransactions. This is for record keeping purposes. In case an equity is held and sold more than once, the date and time at which the dataframe is moved is appended to the dataframe’s name. Example: KO.Fid.Brok_Trans Sat Jun 20 22:00:31 2020 — A Coca Cola holding in a Fidelity Brokerage account was completely sold off and the last transaction was entered on Jun 20 2020. See MainList$Transactions for more information.

MainList$SoldPortfolio: Similar to MainList$SoldTransactions, when the complete position of a holding is sold, the portfolio dataframe for that holding is moved to MainList$SoldPortfolio. This is for record keeping purposes. In case an equity is held and sold more than once, the date and time at which the dataframe is moved is appended to the dataframe’s name. Example: KO.Fid.Brok_Value Sat Jun 20 22:00:38 2020 – A Coca Cola holding in a Fidelity Brokerage account was completely sold off and the last transaction was entered on Jun 20 2020. See MainList$Portfolio for more information.

MainList$Transactions: MainList$Transactions is a list of dataframes with each dataframe corresponding to an equity holding. Each holding has both a MainList$Portfolio dataframe (which track of the value of the holding based on stock prices) and a MainList$Transactions dataframe (which tracks the share quantity by recording each purchase/sale). The naming convention is: EquitySymbol.Subinstitution.AccountType_Trans. For example, if Apple stock were held in Bob’s Vanguard brokerage account, it would be named: AAPL.VanB.Brok_Trans. If Cocal Cola were held in Alice’s Fidelity 401k account, it would be KO.FidA.401k_Trans. Each time MainList$Portfolio is updated, it draws on MainList$Transactions to determine the total number of shares of a holding.