Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

krg

Create Kissell Research Group transaction-cost analysis object

To start with transaction cost analysis, use MATLAB® to retrieve the encrypted market-impact parameters from the Kissell Research Group (KRG) FTP site. Then, use krg to create a transaction-cost analysis object to store the encrypted data. For details about market-impact parameters and data, consult the Kissell Research Group. For a simple example of estimating trading costs, see Estimate Trading Costs for Collection of Stocks.

Syntax

k = krg(midata)
k = krg(midata,midate)
k = krg(midata,midate,micode)
k = krg(midata,midate,micode,tradedays)

Description

example

k = krg(midata) creates a transaction-cost analysis object with market-impact parameter data.

example

k = krg(midata,midate) selects a market-impact date.

example

k = krg(midata,midate,micode) also selects a market-impact code.

example

k = krg(midata,midate,micode,tradedays) adds the number of trading days in a year.

Examples

collapse all

Retrieve the market-impact data from the Kissell Research Group FTP site. Connect to the FTP site using the ftp function with a user name and password. Navigate to the MI_Parameters folder and retrieve the market-impact data in the MI_Encrypted_Parameters.csv file. miData contains the encrypted market-impact date, code, and parameters.

f = ftp('ftp.kissellresearch.com','username','pwd');
cd(f,'MI_Parameters');
mget(f,'MI_Encrypted_Parameters.csv');

miData = readtable('MI_Encrypted_Parameters.csv','delimiter', ...
    ',','ReadRowNames',false,'ReadVariableNames',true);

Create a Kissell Research Group transaction-cost analysis object k.

k = krg(miData)
k = 

  krg with properties:

             MiData: [276x12 table]
             MiDate: 09-Sep-2015
             MiCode: 1.00
    TradeDaysInYear: 250.00

k has these properties:

  • Market-impact data

  • Market-impact date

  • Market-impact code

  • Number of trading days in the year

You can estimate trading costs using the market activity the current day. For details, see Estimate Trading Costs for Collection of Stocks.

Retrieve the market-impact data from the Kissell Research Group FTP site. Connect to the FTP site using the ftp function with a user name and password. Navigate to the MI_Parameters folder and retrieve the market-impact data in the MI_Encrypted_Parameters.csv file. miData contains the encrypted market-impact date, code, and parameters.

f = ftp('ftp.kissellresearch.com','username','pwd');
cd(f,'MI_Parameters');
mget(f,'MI_Encrypted_Parameters.csv');

miData = readtable('MI_Encrypted_Parameters.csv','delimiter', ...
    ',','ReadRowNames',false,'ReadVariableNames',true);

Create a Kissell Research Group transaction-cost analysis object k with a specific market-impact date midate. Set the date to yesterday.

midate = 'yesterday';

k = krg(miData,midate)
k = 

  krg with properties:

             MiData: [276x12 table]
             MiDate: 09-Sep-2015
             MiCode: 1.00
    TradeDaysInYear: 250.00

You can estimate trading costs using the market activity for yesterday. For details, see Estimate Trading Costs for Collection of Stocks.

Retrieve the market-impact data from the Kissell Research Group FTP site. Connect to the FTP site using the ftp function with a user name and password. Navigate to the MI_Parameters folder and retrieve the market-impact data in the MI_Encrypted_Parameters.csv file. miData contains the encrypted market-impact date, code, and parameters.

f = ftp('ftp.kissellresearch.com','username','pwd');
cd(f,'MI_Parameters');
mget(f,'MI_Encrypted_Parameters.csv');

miData = readtable('MI_Encrypted_Parameters.csv','delimiter', ...
    ',','ReadRowNames',false,'ReadVariableNames',true);

Create a Kissell Research Group transaction-cost analysis object k with a specific market-impact code micode. Set the date to yesterday. Set the code to one.

midate = 'yesterday';
micode = 1;

k = krg(miData,midate,micode)
k = 

  krg with properties:

             MiData: [276x12 table]
             MiDate: 09-Sep-2015
             MiCode: 1.00
    TradeDaysInYear: 250.00

Using the market activity for yesterday, you can estimate trading costs for a particular market region. For details, see Estimate Trading Costs for Collection of Stocks.

Retrieve the market-impact data from the Kissell Research Group FTP site. Connect to the FTP site using the ftp function with a user name and password. Navigate to the MI_Parameters folder and retrieve the market-impact data in the MI_Encrypted_Parameters.csv file. miData contains the encrypted market-impact date, code, and parameters.

f = ftp('ftp.kissellresearch.com','username','pwd');
cd(f,'MI_Parameters');
mget(f,'MI_Encrypted_Parameters.csv');

miData = readtable('MI_Encrypted_Parameters.csv','delimiter', ...
    ',','ReadRowNames',false,'ReadVariableNames',true);

Create a Kissell Research Group transaction-cost analysis object k with a specific number of trading days in the year tradedays. Set the number of trading days to 251. By entering [] for the market-impact date and code, krg sets these input arguments to default values.

tradedays = 251;

k = krg(miData,[],[],tradedays)
k = 

  krg with properties:

             MiData: [276x12 table]
             MiDate: 09-Sep-2015
             MiCode: 1.00
    TradeDaysInYear: 251.00

Using the market activity for yesterday, you can estimate trading costs for a particular market region with 251 trading days in the year. For details, see Estimate Trading Costs for Collection of Stocks.

Retrieve the market-impact data from the Kissell Research Group FTP site. Connect to the FTP site using the ftp function with a user name and password. Navigate to the MI_Parameters folder and retrieve the market-impact data in the MI_Encrypted_Parameters.csv file. miData contains the encrypted market-impact date, code, and parameters.

f = ftp('ftp.kissellresearch.com','username','pwd');
cd(f,'MI_Parameters');
mget(f,'MI_Encrypted_Parameters.csv');

miData = readtable('MI_Encrypted_Parameters.csv','delimiter', ...
    ',','ReadRowNames',false,'ReadVariableNames',true);

Create a Kissell Research Group transaction-cost analysis object k using miData.

k = krg(miData);

Modify the MiDate property to retrieve market-impact data from a different day.

k.MiDate = '05-Dec-2015'
k = 

  krg with properties:

             MiData: [276x12 table]
             MiDate: '05-Dec-2015'
             MiCode: 1.00
    TradeDaysInYear: 251.00

You can estimate trading costs using the market activity for the specified day. For details, see Estimate Trading Costs for Collection of Stocks.

Input Arguments

collapse all

Market-impact data, specified as a table. This table contains the encrypted market-impact date, code, and parameters. Retrieve this data from the Kissell Research Group FTP site ftp://ftp.kissellresearch.com using your user name and password. For details, consult the Kissell Research Group.

Data Types: table

Market-impact date, specified as a double, character vector, string scalar, or scalar datetime array. By default, the market-impact date is the current date. To decrypt market-impact parameters for a specific date, set this date. For details, consult the Kissell Research Group.

Example: midate = 'yesterday';

Data Types: double | char | string | datetime

Market-impact code, specified as a numeric scalar. By default, the market-impact code is one. To decrypt market-impact parameters for a specific market region, set this code. For details, consult the Kissell Research Group.

Example: micode = 1;

Data Types: double

Number of trading days in the year, specified as a numeric scalar. By default, the number of trading days in the year is 250.

Data Types: double

Output Arguments

collapse all

Transaction cost analysis, returned as a KRG object. This table describes the object properties.

PropertyDescription

MiData

Kissell Research Group market-impact parameter data

MiDate

Kissell Research Group market-impact date

MiCode

Kissell Research Group market-impact code

TradeDaysInYear

Number of trading days in the year

Tips

  • If the market-impact code does not exist in the market-impact data, this error displays.

    The given region code does not match any records in the market impact data.

Introduced in R2016a

Was this topic helpful?