Vision Application Classes: Company and Security
Overview
The instances of the class Company represent the individual corporate entities for which you track information. Information maintained for a company typically includes country, industry, sales, and earnings. The instances of the class Security represent the individual securities issued by a company or equivalent entity such as the government. A variety of security types exist including cash, common and preferred stocks, convertible and non-convertible bonds, and put and call options. Data maintained for a security typically includes price, dividend and shares/amount outstanding information. Portfolios hold specific amounts of one or more securities.
The following subset of the class hierarchy displays the classes directly related to Company and Security:
Object | Entity | | | |-- Company | | | |-- Security | | | |-- Classification | | | |-- Country | | | |-- Industry | | | |-- Sector | | | |-- SecurityType | | | |-- AssetCategory | DataRecord | |-- DivRecord | |-- PriceRecord
Basic Access
The naming dictionaries Named Company and Named Security are the primary dictionaries for accessing individual company and security instances. For example:
Named Company IBMaccesses the company representing the corporate entity IBM and:
Named Security IBMaccesses the security representing the common stock IBM.
All company and security instances will have at least one identifier. Unique identifiers are stored as aliases in the Named Company and Named Security dictionaries. By default, the value of the code property is used as the first alias created. Additional aliases are usually created for security and company access. For domestic securities, the cusip and ticker are normally defined as aliases. For international securities, the sedol is normally defined as an alias. Any alias that is added for a security is automatically added as an alias for its associated company as well.
To display all the aliases associated with a specific entity you can display the list of strings stored in the aliases property. For example, to see the aliases defined for the company IBM use:
Named Company IBM aliases do: [ printNL ] ;More information about company and security identification schemes is available in the document Portfolio Management Application Issues.
Securities and companies respond to all Entity and Object messages such as code, name, and baseCurrency. The message displayInfo has been redefined to display the code, ticker, and name for Security and Company. The message profile has also been redefined for these classes to display additional information. For example:
Named Company IBM displayInfo ;displays a summary line of information about the company IBM and:
Named Security IBM profile ;displays key information about the security IBM.
The message masterList can be used to return the list of non-default companies or securities. For example, to display the code and name for each Company instance, use:
Company masterList do: [ code print: 10 ; name printNL ; ] ;To display the number of Security instances, use:
Security masterList count
The Company-Security Connection
The security IBM Common Stock is a Vision object whose properties include pricing, dividend, and split information. This object is distinct from the company IBM whose properties include sales, earnings, and industry information. Although Company and Security are distinct classes in the Vision hierarchy, there is obviously a close relationship between related instances of the two classes since most securities are associated with a specific company and companies issue one or more securities.
When you refer to the price earnings ratio for a security, you are really asking for the current price of the security divided by the earnings per share for the corporate entity that issued the security. The property company is defined at Security to return the value of the company associated with the security. The actual object representing the company is returned. For example, the Vision expression:
Named Security IBM companyreturns the object representing the company IBM and the expression:
Named Security IBM company = Named Company IBMyields the result TRUE. Note that several securities may have the same value for company since more than one security can be issued by a single company entity. By default, the value of company for a security is the default company instance. Automated and manual rules can be used to link a security to its "real" company instance.
When you refer to the price earnings ratio for a company, you are really asking for the current price of the company's primary security divided by the earnings per share for the company. The property primarySecurity is defined at Company to return the value of the security defined as the primary security for the company. The actual object representing the security is returned. For example, the Vision expression:
Named Company IBM primarySecurityreturns the object representing IBM's common stock security and the expression:
Named Company IBM primarySecurity = Named Security IBMyields the result TRUE. Note that only one security can be assigned as the primarySecurity for a company. By default, the value of primarySecurity for a company is the default security instance. Automated and manual rules can be used to link a company to its "real" primary security instance.
The peRatio method could therefore be defined for Security and Company as follows:
Security defineMethod: [ | peRatio | price / company eps ] ; Company defineMethod: [ | peRatio | primarySecurity price / eps ] ;where eps would need to be defined as a Company message that returns the company's earnings per share.
The property securityList is defined at Company to return the list of securities associated with a company. To look at the securities associated with a company, use:
Named Company IBM securityList do: [ displayInfo ] ;
Company and Security Message Summary
The following messages return basic Company information:
Message | Return Class | Description |
---|---|---|
baseCurrency | Currency | default currency for storing and accessing monetary data for the company |
code | String | primary identifier |
country | Country | primary country of operations |
creationDate | Date | date instance was created |
cusip | String | cusip associated with primary security |
fiscalYearEnd | Integer | month of fiscal year end (1-12) |
id | String | ticker if defined, code otherwise |
industry | Industry | primary industry |
isMemberOf: | Boolean | is company in supplied universe or classification? |
isin | String | isin associated with primary security |
name | String | company name |
primarySecurity | Security | primary security issued by company |
sector | Sector | sector associated with industry |
securityList | List | list of securities issued by company |
sedol | String | sedol associated with primary security |
ticker | String | ticker associated with primary security |
universes | List | list of universes containing company |
valor | String | valor associated with primary security |
Messages such as industry and primarySecurity return an object of another entity class. You can therefore navigate to that object and request any of its information. For example, the expression:
Named Company GM primarySecurity namereturns the name of GM's primary security and the expression:
Named Company GM industry showMessagesdisplays the messages defined for the Industry class.
Company instances return instances of the classes Country, Industry, and Sector via the messages country, industry, and sector. These classes are described below.
For general descriptions of all the Company messages, see the document Vision Application Messages: Company. A number of messages have been defined to address company identification and the relationship between a company and the securities issued by it. These messages are described in more detail in the document Portfolio Management Application Issues.
The following messages return basic Security information:
Message | Return Class | Description |
---|---|---|
adjustmentFactor | Number | cumulative adjustment factor |
baseCurrency | Currency | default currency for storing and accessing monetary data for the security |
canCusip | String | canadian cusip id |
company | Company | issuing company |
code | String | primary identifier |
creationDate | Date | date instance was created |
cusip | String | cusip id |
dividend | Number | latest cash dividend (relative to ^date) |
dividends | TimeSeries | time series of all dividends |
getDivsFrom:to: | Number | total cash dividends in period |
getPriceRecord | PriceRecord | latest price record (relative to ^date) |
id | String | ticker if defined, otherwise code |
isMemberOf: | Boolean | is security in supplied universe or classification? |
isin | String | isin id |
name | String | security name |
price | Number | latest closing price (relative to ^date) |
priceChangeFrom:to: | Number | percent change in price |
prices | TimeSeries | time series of all prices |
rawSplitFactor | Number | raw split factor |
sedol | String | sedol id |
sharesOut | Number | latest shares outstanding (relative to ^date) |
ticker | String | ticker symbol id |
totalReturnFrom:to: | Number | total return for period |
type | SecurityType | security type |
universes | List | list of universes containing security |
valor | String | valor id |
volume | Number | latest trading volume (relative to ^date) |
Messages such as securityType and company return an object of another entity class. You can therefore navigate to that object and request any of its information. For example, the expression:
Named Security GM company namereturns the name of GM's company and the expression:
Named Security GM type showMessagesdisplays the messages defined for the SecurityType class.
Security instances return instances of the classes SecurityType and AssetCategory via the message type and the expression type assetCategory described below. Messages that access pricing and dividend information such as price and dividend interact with the PriceRecord and DivRecord, classes, also described below . Messages that are used to support split adjustment are also described later in this document.
A number of messages are defined at Security to return related Account and Holding information. These messages are described in the document Vision Application Classes: The Account Classes.
For general descriptions of all the Security messages, see the document Vision Application Messages: Security. A number of messages have been defined to address security identification and the relationship between a Security and its issuing company. These messages are described in more detail in the document Portfolio Management Application Issues.
Prices and Dividends
The instances of the class PriceRecord contain a single date's pricing information for a specific Security instance. The time series property pricingSeries is used to manage the relationship between Security instances and their PriceRecord instances over time. The instances of the class DivRecord contains total cash dividends paid by a security for a single date. The time series property dividendSeries is used to manage the relationship between Security instances and their DivRecord instances over time.
The messages price and volume are defined at Security to return the most recent closing price and trading volume for the security as of the current evaluation date (i.e., ^date). The price and volume are adjusted for any splits that have happened since the data was stored. The price is returned in the security's baseCurrency by default. For example:
Named Security GM pricereturns GM's latest price value in GM's base currency,
Named Security GM :price asOf: 9702 .or
9702 evaluate: [ Named Security GM price ]returns the latest price as of Feb 28, 1997 in GM's base currency, and
"CAN" asCurrency evaluate: [ Named Security GM price ]returns GM's latest price in Canadian dollars. The expression:
Named Security GM volumereturns GM's latest trading volume and the expressions:
Named Security GM :volume asOf: 9702 .or
9702 evaluate: [ Named Security GM volume ]returns the latest volume as of Feb 28, 1997.
All values are split-adjusted through the current date.
The following messages are defined for the class PriceRecord:
Message | Return Class | Description |
---|---|---|
_ask | Number | actual ask value provided |
_bid | Number | actual bid value provided |
_high | Number | actual high value provided |
_low | Number | actual low value provided |
_open | Number | actual open value provided |
_price | Number | actual closing price value provided |
_volume | Number | actual trading volume value provided |
adjustmentDate | Date | date pricing data adjusted through |
adjustmentFactor | Number | split adjustment factor |
ask | Number | split/currency adjusted ask |
baseCurrency | Currency | currency pricing data stored in |
bid | Number | split/currency adjusted bid |
currencyFactor | Number | currency adjustment relative to recordDate |
high | Number | split/currency adjusted high |
low | Number | split/currency adjusted low |
open | Number | split/currency adjusted open |
price | Number | split/currency adjusted closing |
recordDate | Date | date of price record |
security | Number | underlying security |
volume | Number | split adjusted trading volume |
To access a full price record as of a specific date, use the message getPriceRecord. For example, the expression:
Named Security GM getPriceRecord do: [ price print ; _price printNL ] ;displays the latest adjusted and unadjusted closing prices. The expressions:
Named Security GM :getPriceRecord asOf: 9709 . do: [ price print ; _price printNL ] ;and
9709 evaluate: [ Named Security GM getPriceRecord do: [ price print ; _price printNL ] ; ] ;both display the latest adjusted and unadjusted closing prices as of September 30, 1997.
The message prices returns a TimeSeries of all PriceRecord instances associated with a Security. For example, to display the adjusted and unadjusted prices and volumes for all points in GM's time series, you could use:
Named Security GM prices do: [ ^date print: 12 ; #-- date in time series recordDate print: 12 ; #-- date in record - should match price print ; #-- adjusted value _price print ; #-- unadjusted value volume print ; #-- adjusted value _volume print ; #-- unadjusted value currencyFactor print ; #-- should be 1 newLine print ; ] ;Note that the prices message returns an actual time series object so you need not prepend the ":" to the message name.
For general descriptions of all the PriceRecord messages, see the document Vision Application Messages: DataRecord. Special issues involved with managing the storage of pricing data are described in the document Portfolio Management Application Issues.
The message dividend is defined at Security to return the most recent cash dividend for the security as of the current evaluation date (i.e., ^date). The dividend is adjusted for any splits that have happened since the data was stored and is returned in the security's baseCurrency by default. For example:
Named Security GM dividendreturns GM's latest dividend value in GM's base currency,
Named Security GM :dividend asOf: 9702 .or
9702 evaluate: [ Named Security GM dividend ]returns the latest dividend as of Feb 28, 1997 in GM's base currency, and
"CAN" asCurrency evaluate: [ Named Security GM dividend ]returns GM's latest dividend in Canadian dollars.
All values are split-adjusted through the current date.
The following messages are defined for the class DivRecord:
Message | Return Class | Description |
---|---|---|
_div | Number | actual cash dividend value provided (same as recordValue) |
adjustmentDate | Date | date dividend adjusted through |
adjustmentFactor | Number | split adjustment factor |
baseCurrency | Currency | currency dividend data stored in |
currencyFactor | Number | currency adjustment relative to recordDate |
div | Number | split/currency adjusted dividend |
paymentDate | Date | payment date of dividend |
recordDate | Date | ex-date of dividend record |
security | Number | underlying security |
The message dividends returns a TimeSeries of all DivRecord instances associated with a Security. For example, to display the adjusted and unadjusted dividend values for each of GM's dividends, you could use:
Named Security GM dividends do: [ ^date print: 12 ; #-- date in time series recordDate print: 12 ; #-- date in record - should match div print ; #-- adjusted value _div print ; #-- unadjusted value currencyFactor print ; #-- should be 1 newLine print ; ] ;Note that the dividends message returns an actual time series object so you need not prepend the ":" to the message name.
For general descriptions of all the PriceRecord messages, see the document Vision Application Messages: DataRecord. Special issues involved with managing the storage of pricing data are described in the document Portfolio Management Application Issues.
Split Adjustments
To adjust per share data it is necessary to know what splits have occurred between the date the data is known to be adjusted through (adjustment date) and the current date. To accomplish this, Vision tracks splits for each security in a time series called rawSplitFactor. The actual factors are stored in this time series as of their ex-date. For example, if a 2-for-1 split in GM Corporation occurred on January 15, 1995, the value 2 would be stored in GM's rawSplitFactor as of this date. Vision tracks a second time series called adjustmentFactor that represents the running product of these raw factors. This variable has an initial value of 1. Each time a split occurs, a new point representing the product of the new raw factor and the last adjustment factor is stored in the adjustment factor as of the ex-date.
In general, methods have been created that automatically return adjusted values by default. For example, the message _price is defined to return a PriceRecord's unadjusted price (i.e., the original value) and the message price is defined to return a PriceRecord's price adjusted for any splits.
The split adjustment process is described in detail in the document Portfolio Management Application Issues.
Updating Company and Security Data
The Interface class ExternalFeedManager has been created to provide a uniform way to create and update any entity-related information. DataFeed subclasses are defined to translate one or more rows of information into the appropriate structures in your Vision database. Data can be supplied from a file, a spreadsheet, a relational database, or any other table-based source. You can also supply data directly as a string, using the tab character to delimit columns and the carriage return to delimit rows.
Several DataFeed classes have been defined to load data for Company, Security, and related classes:
DataFeed | Description |
---|---|
CompanyMaster | creates Company instances and refreshes basic properties |
SecurityMaster | creates Security instances and refreshes basic properties |
PriceFeed | updates pricing data for Security instances |
DivFeed | updates dividend data for Security instances |
SplitsFeed | updates stock split data for Security instances |
SecurityAliases | establishes aliases for Security instances |
CountryMaster | creates Country instances and refreshes basic properties |
IndustryMaster | creates Industry instances and refreshes basic properties |
SectorMaster | creates Sector instances and refreshes basic properties |
SecurityTypeMaster | creates SecurityType instances and refreshes basic properties |
AssetCatMaster | creates AssetCategory instances and refreshes basic properties |
CompanyToCountry | updates the company-country relationship |
CompanyToIndustry | updates the company-industry relationship over time |
IndustryToSector | updates the industry-sector relationship |
The CompanyMaster data feed class can be used to create and refresh Company instances. The following tab-delimited feed could be used to create Company instances and refresh basic information:
Interface ExternalFeedManager upload: "CompanyMaster" using: #-- make sure this is tab-delimited "Id Name fiscalYearEnd 00036110 AAR CORP 5 00079410 ACC CORP 12 00095710 ABM INDUSTRIES 10 " ;The following tab-delimited string could be used to create and refresh Security instances:
Interface ExternalFeedManager upload: "SecurityMaster" using: #-- make sure this is tab-delimited "entityId name companyId cusip ticker currencyId type 00036110 AAR COM 00036110 00036100 AIR USD 1 00079410 ACC COM 00079410 00079410 ACCC USD 1 00095710 ABM IND 00095710 00095710 AMB USD 1 " ;The following tab-delimited string could be used to update prices:
Interface ExternalFeedManager upload: "PriceFeed" using: #-- make sure this is tab-delimited "entityId date currencyId close volume 12345610 19971117 USD 88.000 0.28 12345610 19971118 USD 87.500 0.15 12345610 19971119 USD 42.000 0.63 98765410 19971117 CAD 30.500 0.32 98765410 19971118 CAD 30.400 0.05 98765410 19971119 CAD 29.900 0.07 " ;
Related Classes
The Country Class
Instances of the Country class correspond to individual countries such as United States, Canada, and Great Britain. The Portfolio Management Application Layer pre-defines a number of countries using the 2-character ISO standard identifiers and names. To display the code and name for each defined country use:
Country masterList sortUp: [ name ] . do: [ code print: 15 ; name printNL ] ;
For general descriptions of all the Country messages see the document Vision Application Messages: Classification.
The CountryMaster data feed class can be used to create and refresh Country instances. The following tab-delimited feed could be used to create Country instances and refresh basic information:
Interface ExternalFeedManager upload: "CountryMaster" using: #-- make sure this is tab-delimited "EntityId Name Currency AT Austria ATS AU Australia AUD CA Canada CAD CH Switzerland CHF US United States USD " ;
The fixed property country is used to assign a Country instance to a Company. To display the number of companies in each country, use:
Company masterList groupedBy: [ country ] . #- group into countries sortUp: [ code ] . #- sort by country code do: [ code print: 10 ; #- country code name print: 25 ; #- country name groupList count printNL ; #- number of company instances ] ;To display the first 100 non-US companies by country, use:
Company masterList select: [ country isUS not ] . #- non-US companies first: 100 . #- restrict to 100 companies groupedBy: [ country ] . #- group into countries sortUp: [ code ] . #- sort by country code do: [ #- for each country do the following: code print: 10 ; #- print country code name print: 25 ; #- print country name groupList count printNL ; #- print number of companies in subset groupList #- for each company in country subset do: [ #- do the following: code print: 10 ; #- print company code name printNL ; #- print company name ] ; #- end of groupList for country ] ;You can reassign a country explicitly using:
Named Company IBM :country <- Named Country US ;
You can also use the CompanyMaster data feed class to initialize and reassign country values:
Interface ExternalFeedManager upload: "CompanyMaster" using: #-- make sure this is tab-delimited "EntityId country 00036110 US 00194110 CA 461669 CH 000445 GB 002826 GB 003175 GB " ;
The property memberList has been defined at Country to store the list of Company instances associated with each Country instance. You can manually update the member cross reference using:
#-- clear current memberships Country masterList do: [ :memberList <- defaultInstance memberList ] ; #-- update lists using current companies Company masterList groupedBy: [ country ] . do: [ :memberList <- groupList ] ;Alternatively, you can use the CompanyToCountry data feed which automatically updates the country property at Company and cross references the memberList property at Country:
Interface ExternalFeedManager upload: "CompanyToCountry" using: #-- make sure this is tab-delimited "memberId groupId 00036110 US 00194110 CA 461669 CH 000445 GB 002826 GB 003175 GB " ;If you assign the countries using this feed, the expression:
Named Country GB memberList do: [ displayInfo ] ;displays all the companies with a country value of Great Britain.
Note that you should use this feed instead of the CompanyMaster if you want to cross reference the companies in the memberList property. The memberList property is automatically updated when you use the CompanyToCountry feed. If you assign values to the country property at Company manually or using the CompanyMaster feed, these companies will not be reflected in the country's memberList.
The Industry and Sector Classes
Instances of the Industry class correspond to user-defined industry classifications such as Beverages, Automotive, and Software. Instances of the class Sector correspond to user-defined sectors such as Consumer Durables and Technology. Sectors consist of one or more industries.
To access a specific industry use:
Named Industry at: "110" . name printNL ;To display the code and name for currently defined industries use:
Industry masterList sortUp: [ name ] . do: [ code print: 15 ; name printNL ] ;
To access a specific sector use:
Named Sector at: "TECH" . name printNL ;To display the code and name for currently defined sectors use:
Sector masterList sortUp: [ name ] . do: [ code print: 15 ; name printNL ] ;
The property sector is defined for the class Industry and is used to store the Sector instance associated with the industry. To display the current list of industries grouped into their sectors use:
Industry masterList groupedBy: [ sector ] . #- group into sectors sortUp: [ code ] . #- sort by sector code do: [ #- for each sector do: displayInfo ; #- display sector code/name groupList #- for each industry in sector do: [ #- do the following: " " print: 5 ; #- indent 5 spaces displayInfo ; #- display industry code/name ] ; #- end of industries in sector ] ; #- end of sector
The time series property industry is used to track a company's Industry over time. For example, to view the latest industry for a company use:
Named Company GM industry name printNL ;To view the industry as of a different date use:
95 evaluate: [ Named Company GM industry name printNL ]or
Named Company GM :industry asOf: 95 . name printNL ;To look at industry history use:
Named Company GM :industry #- leading : retrieves the time series do: [ ^date print: 15 ; #- date of entry code print: 10 ; #- industry code on date name printNL ; #- industry name on date ] ;
The message sector is defined at Company to return the sector associated with the company's industry. For example, to view the sector associated with the current industry for a company use:
Named Company GM sector name printNL ;To view the sector as of a different date use:
95 evaluate: [ Named Company GM sector name printNL ]or
Named Company GM :sector asOf: 95 . name printNL ;
The prior expressions are identical to:
Named Company GM industry sector name printNL ; 95 evaluate: [ Named Company GM industry sector name printNL ]and
Named Company GM :industry asOf: 95 . sector name printNL ;
To display the first 100 companies by sector, by industry, use:
Company masterList first: 100 . #- restrict to 100 companies groupedBy: [ sector ] . #- group into sectors do: [ code print: 10 ; #- sector code name printNL ; #- sector name groupList #- for companies in sector groupedBy: [industry ] . #- group into industry do: [ #- and do the following: code print: 10 ; #- industry code name printNL ; #- industry name groupList #- for companies in industry do: [ #- do the following: displayInfo ; #- display company information ] ; #- end of companies in industry ] ; #- end of industries in sector newLine print ; #- skip a line after each sector ] ;
For general descriptions of all the Industry and Sector messages, see the document Vision Application Messages: Classification. Instances of Classification subclasses such as Industry are often managed as a hierarchy. For example, Industry 123 may refer to "Book Publishing", Industry 120 may refer to "General Publishing", and Industry 100 may refer to "General Media". For a general discussion of classification hierarchies, see the document Vision Class: Classification.
The IndustryMaster data feed class can be used to create and refresh Industry instances. The following tab-delimited feed could be used to create Industry instances and refresh basic information:
Interface ExternalFeedManager upload: "IndustryMaster" using: #-- make sure this is tab-delimited "EntityId Name 110 Beverages 120 Cosmetics 130 Grocery Products 140 Apparel 150 Other Consumer Non-durables " ;
The SectorMaster data feed class can be used to create and refresh Sector instances. The following tab-delimited feed could be used to create Sector instances and refresh basic information:
Interface ExternalFeedManager upload: "SectorMaster" using: #-- make sure this is tab-delimited "EntityId Name NOND Consumer non-durables DURB Consumer durables SERV Consumer services RETL Retail trade TECH Technology " ;
The property memberList has been defined at Sector to store the list of Industry instances associated with each Sector instance. You can manually update the member cross reference using:
#-- clear current memberships Sector masterList do: [ :memberList <- defaultInstance memberList ] ; #-- update lists using current companies Industry masterList groupedBy: [ sector ] . do: [ :memberList <- groupList ] ;Alternatively, you can use the IndustryToSector data feed which automatically updates the sector property at Industry and cross references the memberList property at Sector:
Interface ExternalFeedManager upload: "IndustryToSector" using: #-- make sure this is tab-delimited "groupId memberId NOND 110 NOND 120 NOND 130 DURB 210 DURB 220 DURB 230 " ;If you assign the sectors using this feed, the expression:
Named Sector TECH memberList do: [ displayInfo ] ;displays all the industries with a sector value of Technology.
Note that you should use this feed if you want to cross reference the industries in the memberList property defined at Sector. If you assign values to the sector property at Industry manually or using the IndustryMaster feed, these industries will not be reflected in the sector's memberList.
The time series property memberList is used to track the list of Company instances in an industry over time. Any time the industry is reassigned for a company, the memberList for the prior industry and the new industry must be updated. At any point in time, a company will belong to one industry. At any point in time, an industry will have zero or more companies associated with it.
To view an industry's members as of a specific date use:
#-- latest Named Industry at: "540" . #- get industry 540 memberList #- get latest member list (companies) do: [ #- for each member do: code print: 10 ; #- print company code name printNL ; #- print company name ] ; #-- as of last month ^today - 1 monthEnds evaluate: [ Named Industry at: "540" . #- get industry 540 memberList #- get eom member list (companies) do: [ #- for each member do: code print: 10 ; #- print company code name printNL ; #- print company name ] ; ] ; #-- all periods Named Industry at: "540" . :memberList #- leading : returns time series of lists do: [ ^date print ; #- for each date membership changed count printNL ; #- print number of members ^self do: [ displayInfo ] ; #- and display them one per line ] ;
The displayMemberHistory report shows changes in the industry membership over time. For example:
Named Industry at: "540" . displayMemberHistory ;
If you want to utilize the company-industry membership cross reference, you should use CompanyToIndustry data feed to update the industry property at Company. This feed automatically updates the industry property and cross references the memberList property at Industry by date:
Interface ExternalFeedManager upload: "CompanyToIndustry" using: #-- make sure this is tab-delimited "memberId groupId date 00036110 560 Default 00036110 120 951231 00079410 740 Default 00079410 120 931231 00079410 Default 960115 00163T10 140 Default " ;
The message comanyList is defined at Sector to return the list of companies associated with any of the industries in the sector's memberList. This message assumes that the Industry and Sector memberList properties have been appropriately updated.
The SecurityType and AssetCategory Classes
Instances of the SecurityType class correspond to different types of security such as Cash, Common Stock, and Mortgage-Back. Instances of the class AssetCategory correspond to general categories for asset classification. The Portfolio Management Application Layer pre-defines the asset categories: Equity, Fixed, Cash, and Other. Each SecurityType instance is assigned to an AssetCategory via the assetCategory property.
To display the currently defined security types, grouped into asset category use:
SecurityType masterList groupedBy: [ assetCategory ] . do: [ "===> AssetCategory: " print ; code printNL ; groupList do: [ displayInfo ] ; ] ;
The unitCalc property is defined at the SecurityType class to store a multiplier used to adjust units held in market value calculations. The value is 1.00 by default.
For general descriptions of the SecurityType and AssetCategory messages see the document Vision Application Messages: Classification.
The SecurityTypeMaster data feed class can be used to create and refresh SecurityType instances. The following tab-delimited feed could be used to create SecurityType instances and refresh basic information:
Interface ExternalFeedManager upload: "SecurityTypeMaster" using: #-- make sure this is tab-delimited "Id Name UnitCalc AssetCategory 0 Cash & Equiv 1.00 Cash 1 Common Stock 1.00 Equity 2 Corporate Bond 10.00 Fixed 3 Gvt Bond 10.00 Fixed 4 Option 100.00 Other " ;
The AssetCatMaster data feed class can be used to create and refresh AssetCategory instances. The following tab-delimited feed could be used to create AssetCategory instances and refresh basic information:
Interface ExternalFeedManager upload: "AssetCatMaster" using: #-- make sure this is tab-delimited "EntityId Name Equity Equity Fixed Fixed Income Cash Cash & Equivalents Other Other Assets " ;
The fixed property type is used to assign a SecurityType instance to a Security. To display the number of securities in each security type, use:
Security masterList groupedBy: [ type ] . #- group into security types do: [ code print: 10 ; #- security type code name print: 25 ; #- security type name groupList count printNL ; #- number of security instances ] ;
You can reassign a security type explicitly using:
Named Security IBM :type <- Named SecurityType US ;You can also use the SecurityMaster data feed class to initialize and reassign security type values:
Interface ExternalFeedManager upload: "SecurityMaster" using: #-- make sure this is tab-delimited "EntityId type 00036110 1 00194110 1 123456AB 2 456789BC 2 CashUS 0 " ;