Skip to content

Instantly share code, notes, and snippets.

@bayareacoder
Created February 19, 2021 00:10
Show Gist options
  • Save bayareacoder/9cbd59a628ccbe01d187bd2ead440230 to your computer and use it in GitHub Desktop.
Save bayareacoder/9cbd59a628ccbe01d187bd2ead440230 to your computer and use it in GitHub Desktop.
import {AccountValue} from './types';
/** human-readable names & help for account value keys */
export const accountValue: Record<AccountValue, {en: {name: string; msg: string}}> = {
[AccountValue.ACCOUNT_CODE]: {
en: {
name: 'Account Code',
msg: 'The account ID number',
},
},
[AccountValue.ACCOUNT_OR_GROUP]: {
en: {
name: 'Account Or Group',
msg: `"All" to return account summary data for all accounts, or set to a specific Advisor or Account Group name that has already been created in TWS Global Configuration`,
},
},
[AccountValue.ACCOUNT_READY]: {
en: {
name: 'Account Ready',
msg: '(for internal use)',
},
},
[AccountValue.ACCOUNT_TYPE]: {
en: {
name: 'Account Type',
msg: 'Identifies the IB account structure',
},
},
[AccountValue.ACCRUED_CASH]: {
en: {
name: 'Accrued Cash',
msg: 'Total accrued cash value of stock, commodities and securities',
},
},
[AccountValue.ACCRUED_CASH_C]: {
en: {
name: 'Accrued Cash (Commodities)',
msg: `Reflects the current's month accrued debit and credit interest to date, updated daily in commodity segment`,
},
},
[AccountValue.ACCRUED_CASH_S]: {
en: {
name: 'Accrued Cash (Securities)',
msg: `Reflects the current's month accrued debit and credit interest to date, updated daily in security segment`,
},
},
[AccountValue.ACCRUED_DIVIDEND]: {
en: {
name: '',
msg: 'Total portfolio value of dividends accrued ',
},
},
[AccountValue.ACCRUED_DIVIDEND_C]: {
en: {
name: 'Accrued Dividends (Commodities)',
msg: 'Dividends accrued but not paid in commodity segment',
},
},
[AccountValue.ACCRUED_DIVIDEND_S]: {
en: {
name: 'Accrued Dividens (Securities)',
msg: 'Dividends accrued but not paid in security segment',
},
},
[AccountValue.AVAILABLE_FUNDS]: {
en: {
name: 'Available Funds',
msg: 'This value tells what you have available for trading',
},
},
[AccountValue.AVAILABLE_FUNDS_C]: {
en: {
name: 'Available Funds (Commodities)',
msg: 'Net Liquidation Value - Initial Margin ',
},
},
[AccountValue.AVAILABLE_FUNDS_S]: {
en: {
name: 'Available Funds (Securities)',
msg: 'Equity with Loan Value - Initial Margin',
},
},
[AccountValue.BILLABLE]: {
en: {
name: 'Billable',
msg: 'Total portfolio value of treasury bills',
},
},
[AccountValue.BILLABLE_C]: {
en: {
name: 'Billable (Commodities)',
msg: 'Value of treasury bills in commodity segment',
},
},
[AccountValue.BILLABLE_S]: {
en: {
name: 'Billable (Securities',
msg: 'Value of treasury bills in security segment',
},
},
[AccountValue.BUYING_POWER]: {
en: {
name: 'Buying Power',
msg: `Cash Account: Minimum (Equity with Loan Value, Previous Day Equity with Loan Value)-Initial Margin,
Standard Margin Account: Minimum (Equity with Loan Value, Previous Day Equity with Loan Value) - Initial Margin *4`,
},
},
[AccountValue.CASH_BALANCE]: {
en: {
name: 'Cash Balance',
msg: 'Cash recognized at the time of trade + futures PNL',
},
},
[AccountValue.CORPORATE_BOND_VALUE]: {
en: {
name: 'Corporate Bond Value',
msg: 'Value of non-Government bonds such as corporate bonds and municipal bonds',
},
},
[AccountValue.CURRENCY]: {
en: {
name: 'Currency',
msg: 'Open positions are grouped by currency',
},
},
[AccountValue.CUSHION]: {
en: {
name: 'Cushion',
msg: 'Excess liquidity as a percentage of net liquidation value',
},
},
[AccountValue.DAY_TRADES_REMAINING]: {
en: {
name: 'Day Trades Remaining',
msg: 'Number of Open/Close trades one could do before Pattern Day Trading is detected',
},
},
[AccountValue.DAY_TRADESREMAININGT1]: {
en: {
name: 'Day Trades Remaining (T+1)',
msg:
'Number of Open/Close trades one could do tomorrow before Pattern Day Trading is detected',
},
},
[AccountValue.DAY_TRADESREMAININGT2]: {
en: {
name: 'Day Trades Remaining (T+2)',
msg:
'Number of Open/Close trades one could do two days from today before Pattern Day Trading is detected',
},
},
[AccountValue.DAY_TRADESREMAININGT3]: {
en: {
name: 'Day Trades Remaining (T+3)',
msg:
'Number of Open / Close trades one could do three days from today before Pattern Day Trading is detected ',
},
},
[AccountValue.DAY_TRADESREMAININGT4]: {
en: {
name: 'Day Trades Remaining (T+4)',
msg:
'Number of Open / Close trades one could do four days from today before Pattern Day Trading is detected',
},
},
[AccountValue.EQUITY_WITH_LOAN_VALUE]: {
en: {
name: 'Equity With Loan Value',
msg: `Forms the basis for determining whether a client has the necessary assets
to either initiate or maintain security positions`,
},
},
[AccountValue.EQUITY_WITH_LOAN_VALUE_C]: {
en: {
name: 'Equity With Loan Value (Commodities)',
msg: `Cash account: Total cash value + commodities option value - futures maintenance margin requirement + minimum (0, futures PNL)
Margin account: Total cash value + commodities option value - futures maintenance margin requirement`,
},
},
[AccountValue.EQUITY_WITH_LOAN_VALUE_S]: {
en: {
name: 'Equity With Loan Value (Securities)',
msg: `Cash account: Settled Cash
Margin Account: Total cash value + stock value + bond value + (non-U.S. & Canada securities options value)`,
},
},
[AccountValue.EXCESS_LIQUIDITY]: {
en: {
name: 'Excess Liquidity',
msg: 'This value shows your margin cushion, before liquidation',
},
},
[AccountValue.EXCESS_LIQUIDITY_C]: {
en: {
name: 'Excess Liquidity (Commodities)',
msg: 'Equity with Loan Value - Maintenance Margin',
},
},
[AccountValue.EXCESS_LIQUIDITY_S]: {
en: {
name: 'Excess Liquidity (Securities)',
msg: 'Net Liquidation Value - Maintenance Margin ',
},
},
[AccountValue.EXCHANGE_RATE]: {
en: {
name: 'Exchange Rate',
msg: 'The exchange rate of the currency to your base currency',
},
},
[AccountValue.FULL_AVAILABLE_FUNDS]: {
en: {
name: 'Full Available Funds',
msg: 'Available funds of whole portfolio with no discounts or intraday credits',
},
},
[AccountValue.FULL_AVAILABLE_FUNDS_C]: {
en: {
name: 'Full Available Funds (Commodities)',
msg: 'Net Liquidation Value - Full Initial Margin',
},
},
[AccountValue.FULL_AVAILABLE_FUNDS_S]: {
en: {
name: 'Full Available Funds (Securities)',
msg: 'Equity with Loan Value - Full Initial Margin ',
},
},
[AccountValue.FULL_EXCESS_LIQUIDITY]: {
en: {
name: 'Full Excess Liquidity',
msg: 'Excess liquidity of whole portfolio with no discounts or intraday credits',
},
},
[AccountValue.FULL_EXCESS_LIQUIDITY_C]: {
en: {
name: 'Full Excess Liquidity (Commodities)',
msg: 'Net Liquidation Value - Full Maintenance Margin',
},
},
[AccountValue.FULL_EXCESS_LIQUIDITY_S]: {
en: {
name: 'Full Excess Liquidity (Securities)',
msg: 'Equity with Loan Value - Full Maintenance Margin',
},
},
[AccountValue.FULL_INIT_MARGIN_REQ]: {
en: {
name: 'Full Initial Maintenance Margin Requirement',
msg: 'Initial Margin of whole portfolio with no discounts or intraday credits',
},
},
[AccountValue.FULL_INIT_MARGIN_REQ_C]: {
en: {
name: 'Full Initial Maintenance Margin Requirement (Commodities)',
msg: `Initial Margin of commodity segment's portfolio with no discounts or intraday credits`,
},
},
[AccountValue.FULL_INIT_MARGIN_REQ_S]: {
en: {
name: 'Full Initial Maintenance Margin Requirement (Securities)',
msg: `Initial Margin of security segment's portfolio with no discounts or intraday credits`,
},
},
[AccountValue.FULL_MAINT_MARGIN_REQ]: {
en: {
name: 'Full Maintenance Margin Requirement',
msg: `Maintenance Margin of whole portfolio with no discounts or intraday credits`,
},
},
[AccountValue.FULL_MAINT_MARGIN_REQ_C]: {
en: {
name: 'Full Maintenance Margin Requirement (Commodities)',
msg: `Maintenance Margin of commodity segment's portfolio with no discounts or intraday credits`,
},
},
[AccountValue.FULL_MAINT_MARGIN_REQ_S]: {
en: {
name: 'Full Maintenance Margin Requirement (Securities)',
msg: `Maintenance Margin of security segment's portfolio with no discounts or intraday credits`,
},
},
[AccountValue.FUND_VALUE]: {
en: {
name: 'Fund Value',
msg: 'Value of funds value (money market funds + mutual funds) ',
},
},
[AccountValue.FUTURE_OPTION_VALUE]: {
en: {
name: 'Future Option Value',
msg: 'Real-time market-to-market value of futures options',
},
},
[AccountValue.FUTURES_PNL]: {
en: {
name: 'Futures P&L',
msg: 'Real-time changes in futures value since last settlement',
},
},
[AccountValue.FX_CASH_BALANCE]: {
en: {
name: 'FX Cash Balance',
msg: 'Cash balance in related IB-UKL account ',
},
},
[AccountValue.GROSS_POSITION_VALUE]: {
en: {
name: 'Gross Position Value',
msg: 'Gross Position Value in securities segment',
},
},
[AccountValue.GROSS_POSITION_VALUE_S]: {
en: {
name: 'Gross Position Value (Securities)',
msg: 'Long Stock Value + Short Stock Value + Long Option Value + Short Option Value',
},
},
[AccountValue.INDIAN_STOCK_HAIRCUT]: {
en: {
name: 'Indian Stock Haircut',
msg: 'Margin rule for IB-IN accounts',
},
},
[AccountValue.INIT_MARGIN_REQ]: {
en: {
name: 'Initial Margin Requirement',
msg: 'Initial Margin requirement of whole portfolio',
},
},
[AccountValue.INIT_MARGIN_REQ_C]: {
en: {
name: 'Initial Margin Requirement (Commodities)',
msg: 'Initial Margin of the commodity segment in base currency ',
},
},
[AccountValue.INIT_MARGIN_REQ_S]: {
en: {
name: 'Initial Margin Requirement (Securities)',
msg: 'Initial Margin of the security segment in base currency',
},
},
[AccountValue.ISSUER_OPTION_VALUE]: {
en: {
name: 'Issuer Option Value',
msg: 'Real-time mark-to-market value of Issued Option',
},
},
[AccountValue.LEVERAGE_S]: {
en: {
name: 'Leverage (Securities)',
msg: 'GrossPositionValue / NetLiquidation in security segment',
},
},
[AccountValue.LOOK_AHEAD_NEXT_CHANGE]: {
en: {
name: 'Look Ahead Next Change',
msg: 'Time when look-ahead values take effect',
},
},
[AccountValue.LOOK_AHEAD_AVAILABLE_FUNDS]: {
en: {
name: 'Look Ahead Available Funds',
msg: 'This value reflects your available funds at the next margin change ',
},
},
[AccountValue.LOOK_AHEAD_AVAILABLE_FUNDS_C]: {
en: {
name: 'Look Ahead Available Funds (Commodities)',
msg: 'Net Liquidation Value - look ahead Initial Margin',
},
},
[AccountValue.LOOK_AHEAD_AVAILABLE_FUNDS_S]: {
en: {
name: 'Look Ahead Available Funds (Securities)',
msg: 'Equity with Loan Value - look ahead Initial Margin',
},
},
[AccountValue.LOOK_AHEAD_EXCESSLIQUIDITY]: {
en: {
name: 'Look Ahead Excess Liquidity',
msg: 'This value reflects your excess liquidity at the next margin change',
},
},
[AccountValue.LOOK_AHEAD_EXCESSLIQUIDITY_C]: {
en: {
name: 'Look Ahead Excess Liquidity (Commodities)',
msg: 'Net Liquidation Value - look ahead Maintenance Margin ',
},
},
[AccountValue.LOOK_AHEAD_EXCESSLIQUIDITY_S]: {
en: {
name: 'Look Ahead Excess Liquidity (Securities)',
msg: ' Equity with Loan Value - look ahead Maintenance Margin',
},
},
[AccountValue.LOOK_AHEAD_INIT_MARGIN_REQ]: {
en: {
name: 'Look Ahead Initial Margin Requirement',
msg: `Initial margin requirement of whole portfolio as of next period's margin change`,
},
},
[AccountValue.LOOK_AHEAD_INIT_MARGIN_REQ_C]: {
en: {
name: 'Look Ahead Initial Margin Requirement (Commodities)',
msg: `Initial margin requirement as of next period's margin change in the base currency of the account`,
},
},
[AccountValue.LOOK_AHEAD_INIT_MARGIN_REQ_S]: {
en: {
name: 'Look Ahead Initial Margin Requirement (Securities)',
msg: `Initial margin requirement as of next period's margin change in the base currency of the account`,
},
},
[AccountValue.LOOK_AHEAD_MAINT_MARGIN_REQ]: {
en: {
name: 'Look Ahead Maintenance Margin Requirement',
msg: `Maintenance margin requirement of whole portfolio as of next period's margin change`,
},
},
[AccountValue.LOOK_AHEAD_MAINT_MARGIN_REQ_C]: {
en: {
name: 'Look Ahead Maintenance Margin Requirement (Commodities)',
msg: `Maintenance margin requirement as of next period's margin change in the base currency of the account`,
},
},
[AccountValue.LOOK_AHEAD_MAINT_MARGIN_REQ_S]: {
en: {
name: 'Look Ahead Maintenance Margin Requirement (Securities)',
msg: `Maintenance margin requirement as of next period's margin change in the base currency of the account`,
},
},
[AccountValue.MAINT_MARGIN_REQ]: {
en: {
name: 'Maintenance Margin Requirement',
msg: 'Maintenance Margin requirement of whole portfolio',
},
},
[AccountValue.MAINT_MARGIN_REQ_C]: {
en: {
name: 'Maintenance Margin Requirement (Commodities)',
msg: 'Maintenance Margin for the commodity segment',
},
},
[AccountValue.MAINT_MARGIN_REQ_S]: {
en: {
name: 'Maintenance Margin Requirement (Securities)',
msg: 'Maintenance Margin for the security segment',
},
},
[AccountValue.MONEY_MARKET_FUND_VALUE]: {
en: {
name: 'Money Market Fund Value',
msg: 'Market value of money market funds excluding mutual funds',
},
},
[AccountValue.MUTUAL_FUND_VALUE]: {
en: {
name: 'Mutual Fund Value',
msg: 'Market value of mutual funds excluding money market funds',
},
},
[AccountValue.NET_DIVIDEND]: {
en: {
name: 'Net Dividends',
msg:
'The sum of the Dividend Payable/Receivable Values for the securities and commodities segments of the account',
},
},
[AccountValue.NET_LIQUIDATION]: {
en: {
name: 'Net Liquidition Value',
msg: 'The basis for determining the price of the assets in your account',
},
},
[AccountValue.NET_LIQUIDATION_C]: {
en: {
name: 'Net Liquidition Value (Commodities)',
msg: 'Total cash value + futures PNL + commodities options value ',
},
},
[AccountValue.NET_LIQUIDATION_S]: {
en: {
name: 'Net Liquidition Value (Securities)',
msg: 'Total cash value + stock value + securities options value + bond value',
},
},
[AccountValue.NET_LIQUIDATION_BY_CURRENCY]: {
en: {
name: 'Net Liquidation Value by Currency',
msg: 'Net liquidation for individual currencies',
},
},
[AccountValue.OPTION_MARKET_VALUE]: {
en: {
name: 'Option Market Value',
msg: 'Real-time mark-to-market value of options',
},
},
[AccountValue.PA_SHARES_VALUE]: {
en: {
name: 'PA Shares Value',
msg: ' Personal Account shares value of whole portfolio',
},
},
[AccountValue.PA_SHARES_VALUE_C]: {
en: {
name: 'PA Shares Value (Commodities)',
msg: 'Personal Account shares value in commodity segment',
},
},
[AccountValue.PA_SHARES_VALUE_S]: {
en: {
name: 'PA Shares Value (Securities)',
msg: 'Personal Account shares value in security segment',
},
},
[AccountValue.POST_EXPIRATION_EXCESS]: {
en: {
name: 'Post Expiration Excess',
msg: `Total projected "at expiration" excess liquidity`,
},
},
[AccountValue.POST_EXPIRATION_EXCESS_C]: {
en: {
name: 'Post Expiration Excess (Commodities)',
msg: `Provides a projected "at expiration" excess liquidity based on the soon-to expire contracts in your portfolio in commodity segment`,
},
},
[AccountValue.POST_EXPIRATION_EXCESS_S]: {
en: {
name: 'Post Expiration Excess (Securities)',
msg: `Provides a projected "at expiration" excess liquidity based on the soon-to expire contracts in your portfolio in security segment `,
},
},
[AccountValue.POST_EXPIRATION_MARGIN]: {
en: {
name: 'Post Expiration Margin',
msg: `Total projected "at expiration" margin`,
},
},
[AccountValue.POST_EXPIRATION_MARGIN_C]: {
en: {
name: 'Post Expiration Margin (Commodities)',
msg: `Provides a projected "at expiration" margin value based on the soon-to expire contracts in your portfolio in commodity segment`,
},
},
[AccountValue.POST_EXPIRATION_MARGIN_S]: {
en: {
name: 'Post Expiration Margin (Securities)',
msg: `Provides a projected "at expiration" margin value based on the soon-to expire contracts in your portfolio in security segment `,
},
},
[AccountValue.PREVIOUS_DAY_EQUITY_WITH_LOAN_VALUE]: {
en: {
name: 'Previous Day Equity With Loan Value',
msg: `Marginable Equity with Loan value as of 16:00 ET the previous day in securities segment`,
},
},
[AccountValue.PREVIOUS_DAY_EQUITY_WITH_LOAN_VALUE_S]: {
en: {
name: 'Previous Day Equity With Loan Value (Securities)',
msg: `IMarginable Equity with Loan value as of 16:00 ET the previous day`,
},
},
[AccountValue.REAL_CURRENCY]: {
en: {
name: 'Real Currency',
msg: `Open positions are grouped by currency`,
},
},
[AccountValue.REALIZED_PNL]: {
en: {
name: 'Realized P&L',
msg: `Shows your profit on closed positions, which is the difference between your entry execution cost
and exit execution costs, or
(execution price + commissions to open the positions) - (execution price + commissions to close the position)`,
},
},
[AccountValue.REGT_EQUITY]: {
en: {
name: 'RegT Equity',
msg: `Regulation T equity for universal account`,
},
},
[AccountValue.REGT_EQUITY_S]: {
en: {
name: 'ReqT Equity (Securities)',
msg: `Regulation T equity for security segment`,
},
},
[AccountValue.REGT_MARGIN]: {
en: {
name: 'RegT Margin',
msg: `Regulation T margin for universal account`,
},
},
[AccountValue.REGT_MARGIN_S]: {
en: {
name: 'RegT Margin (Securities)',
msg: `Regulation T margin for security segment`,
},
},
[AccountValue.SMA]: {
en: {
name: 'SMA',
msg: `Line of credit created when the market value of securities in a Regulation T account increase in value`,
},
},
[AccountValue.SMA_S]: {
en: {
name: 'SMA (Securities)',
msg: `Regulation T Special Memorandum Account balance for security segment`,
},
},
[AccountValue.SEGMENT_TITLE]: {
en: {
name: 'Segment Title',
msg: `Account segment name`,
},
},
[AccountValue.STOCK_MARKET_VALUE]: {
en: {
name: 'Stock Market Value',
msg: `Real-time mark-to-market value of stock`,
},
},
[AccountValue.TBOND_VALUE]: {
en: {
name: 'TBond Value',
msg: `Value of treasury bonds `,
},
},
[AccountValue.TBILL_VALUE]: {
en: {
name: 'TBill Value',
msg: `Value of treasury bills`,
},
},
[AccountValue.TOTAL_CASH_BALANCE]: {
en: {
name: 'Total Cash Balance',
msg: `Total Cash Balance including Future PNL`,
},
},
[AccountValue.TOTAL_CASH_VALUE]: {
en: {
name: 'Total Cash Value',
msg: `Total cash value of stock, commodities and securities`,
},
},
[AccountValue.TOTAL_CASH_VALUE_C]: {
en: {
name: 'Total Cash Value (Commodities)',
msg: `CashBalance in commodity segment`,
},
},
[AccountValue.TOTAL_CASH_VALUE_S]: {
en: {
name: 'Total Cash Value (Securities)',
msg: `CashBalance in security segment `,
},
},
[AccountValue.TRADING_TYPE_S]: {
en: {
name: 'Trading Type (Securities)',
msg: 'Account Type',
},
},
[AccountValue.UNREALIZED_PNL]: {
en: {
name: 'Unrealized P&L',
msg: `The difference between the current market value of your open positions and the average cost,
or Value - Average Cost`,
},
},
[AccountValue.WARRANT_VALUE]: {
en: {
name: 'Warrant Value',
msg: 'Value of warrants',
},
},
[AccountValue.WHAT_IF_PM_ENABLED]: {
en: {
name: 'What-If Portfolio Margin Enabled',
msg: `To check projected margin requirements under Portfolio Margin model`,
},
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment