Special Variables have specific meanings in the Equihack language. Below, we give detail to what those meanings are.
A special true/false that is used in General.
Used to create criteria for homework assignments. If the variable is not true for some value, it is plotted everywhere.
frequency: common
A special true/false that is used in Backtesting.
Can prevent the positions table from being generated. It is faster but degrades the summary report.
frequency: common
A special number that is used in Backtesting.
Used in conjunction with max_holdings to limit holdings. Selects the stock with the largest value first. Ties are included.
frequency: common
A special true/false that is used in Backtesting.
When stocks are all sold and rebought. Rebalance expressions cannot be per stock. Rebalance expressions using only dates will all be triggered the day it becomes true.
frequency: common
A special true/false that is used in Backtesting.
When to reset stop losses for all stocks if the stock has gone down. Used to update trailing stop losses.
frequency: common
A special number that is used in Screeners and Watchlists.
the score used to evaluate stocks in the heatmap views.
frequency: common
A special number that is used in Backtesting.
Used to model stop gain orders, also called profit-taking orders. Expressed as Close * multiple, or similar.
frequency: common
A special number that is used in Backtesting.
Used to model stop loss orders. Expressed as Close * multiple, or similar.
frequency: common
A special number that is used in Backtesting.
Forces sale of stocks after the time is met. Any expression numeric expression is fine. Ex: if change close 10 < 0 0 else 9999
frequency: common
A special number that is used in Backtesting.
Prevents the sale of stocks until the time is met. Any expression numeric expression is fine. Ex: if change close 10 > 0 9999 else 0
frequency: common
A special true/false that is used in General.
Used to turn off look ahead bias prevention. Don’t use it unless you know exactly what you are doing!
frequency: dangerous
A special true/false that is used in General.
Boolean to disable close > 5 checking. Using this can allow bias
frequency: dangerous
A special number that is used in Simulator Backtest.
Trigger use of Portfolio Backtest. Sets the initial cash at the beginning of the backtest to X
frequency: occasional
A special true/false that is used in Backtesting.
When to reset stop gains for all stocks, either up or down. Used for both trailing stop losses and gain.
frequency: occasional
A special true/false that is used in Backtesting.
When to reset stop gains for all stocks, if the stock has gone down. Used to update trailing stop losses.
frequency: occasional
A special true/false that is used in Backtesting.
When to reset stop gains for all stocks if the stock has increased. Used to update trailing stop gains.
frequency: occasional
A special true/false that is used in Backtesting.
When to reset stop losses for all stocks, either up or down. Used for both trailing stop losses and gain.
frequency: occasional
A special number that is used in Backtest.
Sets the weight of the given security. Ex: spy_weight sets the weight of SPY. If no security exists, look for a numeric var of that name and use it as a price series. So if a banana exists and is the price of bananas, banana_weight simulates holding a fixed quantity of bananas in the portfolio.
frequency: rare
A special number that is used in Simulator Backtesting.
The account stops making any trades and sells all stocks if PortfolioValueTotal falls below this amount
frequency: rare
A special number that is used in Backtesting.
The price of a stock when it is bought. Normally Close, unless overridden by commissions or other. See Trading Price: Kini for example
frequency: rare
A special true/false that is used in General.
It used to force the system to cache everything, making the current run slower and future runs faster.
frequency: rare
A special number that is used in Backtesting.
The weight of cash. Values other than 0 simulate cash in the portfolio not used for investing. Negative values simulate margin.
frequency: rare
A special true/false used in Backtesting.
A per-stock boolean to decide a delisting is due to bankruptcy rather than a merger. Bankruptcies are assumed to lose everything
frequency: rare
A special number that is used in Backtesting.
What dividends are given to shareholders. Normally unset or 0 to simulate eaten dividends
frequency: rare
A special true/false that is used in Simulator Backtest.
Buys and sells stocks without distributed positions that are still in force. Triggers switching normal Backtest to Simulator Backtest.
frequency: rare
A special number that is used in Screeners, Watchlists, and Backtesting.
Used in conjunction with order_by to limit holdings.
frequency: rare
A special number that is used in Backtesting.
A calculation to define today’s price for each stock, normally Close.
frequency: rare
A special number that is used in Backtesting.
How many montes to run
frequency: rare
A special integer that is used in Backtesting.
For choose_set/choose_range: How many choices to run for items
frequency: rare
A special number that is used in Simulator Backtesting.
Simulates buy and sell orders in a screener. use maximum TERM1 … TERMN where each TERM is any of Close N at DATE, to simulate adding (or subtracting) the given amount of cash at the given date GE: Close 10000 at DATE, to simulate buying $10,000 of GE stock on the given date 100 GE: Close at DATE, to simulate buying 100 shares of GE stock GE: Close 100 * 13.57 at DATE to simulate buying 100 shares of GE stock for $13.57 each
frequency: rare
A special number that is used in Backtesting.
The weight to give each position. These are added and divided to create unit weights, so market_cap is a fine weight. Weights less than zero in old-style portfolios require the user to offset the cash generated with cash_weight, or else the results are wrong
frequency: rare
A special true/false that is used in Backtesting.
When to reset stop losses for all stocks if the stock has increased. Used to update trailing stop losses.
frequency: rare
A special true/false that is used in Screeners and Watchlists.
It makes the screener behave like a watchlist and show results from the last rebalance date before the screening date supplied.
frequency: rare
A special number that is used in Backtest.
The price stocks are sold at. Normally Close, unless overridden by commissions or other. See Trading Price “Kini”, for example.
frequency: rare
A special number that is used in Backtesting.
Prevents rebuying of sold stocks until the time since the sale is met. Any numeric expression is fine
frequency: rare
A special number that is used in Backtesting.
provides a default modeling for slippage. Is overridden by buy_price and sell_price
frequency: rare
A special integer that is used in Backtesting.
For choose_set/choose_range: How far back to offset the test interval
frequency: rare
A special number that is used in Backtesting.
For choose_set/choose_range: What are you looking for?
frequency: rare
A special integer that is used in Backtesting.
For choose_set/choose_range: How long in trading days should the try screen cover
frequency: rare
A special true/false that is used in General.
Sets the set of securities included in screens, ranks, and backtests. Stocks no longer matching the universe will be sold.
frequency: rare
A special number used in Backtesting.
For items containing monte_range or monte_set. Use minimum X1 … XN, where each Xi is between 0 and 1, which monte lines to plot. if -1 is included, plot all
frequency: rare
A special number that is used in Backtesting.
For choose_set/choose_range: Which of the test tries should be carried forward? Between 0 and 1
frequency: rare
A special true/false that is used in General.
Used to test strategies, if assert_ is false, the system throws an error.
frequency: scaffolding
A special true/false that is used in Backtesting.
Only include still holding positions in the positions table
frequency: scaffolding
A special true/false that is used in Simulator Backtesting.
Ignore cash when calculating the green line, so the portfolio is scored as if it was fully invested, and no more
frequency: scaffolding
A special true/false that is used in General.
It prevents any part of the term from being cached. It slows everything down!!!
frequency: scaffolding
A special number that is used in Backtesting.
The cost to hold the current portfolio. Any numeric per stock expression is fine
frequency: speculative
A special true/false that is used in Backtesting.
Experimental: tabulate all plot variables into a table for attribution analysis.
frequency: speculative