Investment Studio > Views > Quotes > Grid fields
For generic help on Grid record definitions, see
The following notes are specific
to the Quotes
view's Grid object.
Click
in
its toolbar or use Customize > Setup in its pop-up
menu to open the record definition editor.
| This Grid's primary purpose is to provide direct access to Investment Studio's internal table of assets in the selected portfolio. Its record definition should therefore contain at least one Asset type field (Why? See the discussion of lookup record fields!). | |
| In most cases, asset name, symbol and currency should all be exposed, preferably using read-only cells. Since the Quotes Grid doesn't display all assets (only variable price assets are listed) and doesn't provide any means for asset creation and deletion, it's usually better to keep all asset property editing in the Assets view. | |
| The Quotes view supports the custom asset property called "_COLOR". If exposed in the Quotes Grid, this property too should be made read-only, for the same reasons as the built-in asset properties. | |
| Chart and Graph expressions can access Grid field values for the selected asset using the "GRID" symbol qualifier, as in "GRID._NAV". | |
| Use the special symbols FROM_DATE and TO_DATE to find out the view's current date range, as set in the toolbar (e.g. to compute price performance over the time frame being displayed). Since up-to-date NAVs may not be available, the dates of the actual quotes should always be provided too. | |
| Use the
special symbol PORTFOLIO to get the index of the selected
portfolio in Investment Studio's internal table of loaded
portfolios. This allows portfolio data to be used in
expressions and comparisons to be made between asset
prices and portfolio averages (e.g. beta, correlation). Note however that the portfolio's system is not re-evaluated immediately when quotes are modified using the quote editor. This is only done upon exit from the Quotes view. If the selected portfolio includes an active system, you should therefore not trust transaction records, portfolio and asset NAVs until you've left the Quotes view. |
|
| Use the special symbol SELECTED to get the index of the selected asset in Investment Studio's internal table of assets in the selected portfolio. This allows comparisons to be made between each asset (identified by the value of any Asset type field in the Grid's record definition) and the selected asset (identified by SELECTED). For instance, you could compare relative strengths or compute asset price correlations, and have them automatically recomputed whenever a new asset (or a new date range) is selected in the Grid. | |
| Comparisons
across assets can also involve a fixed asset rather than
the SELECTED one. Since asset indices may change at any
time, they can not be specified using constants, but they
can be obtained by a simple trick. The following
expression will return the index of the asset with symbol
"TEST" (or #N/A if no such asset is found): =match("TEST", mop("asset_symbol()", makevector(1000, 0, 1)), 0) - 1 This expression assumes that there are at most 1000 assets in the portfolio - increase the first makevector argument if there are more (!). Alternatively, use the portfolio_flags function with the special symbol PORTFOLIO to get a listing of all assets in the selected portfolio, then count them with rows. |