PortfolioWorth: Evaluate Market Worth of Given Protfolio

Description Usage Arguments Value Examples

Description

The evaluation is done at time of a given date.

Usage

1
PortfolioWorth(dir = dir, df, date, time = 145900, market = 'SHSZ') 

Arguments

dir

The directory containing the Tick data.

date

the date of evaluation.

time

the time of evaluation.

df

The dataframe containing the portfolio.

market

specifying the sub-function to call depending on the market.

Value

A number indicating the markrt worth.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## locate tick data directory ##
dir <- system.file("extdata", '', package = "TickExec")

## establish a posiyion to sell ##
dfLog = LimitBuy(dir = dir, date = 20141013, ticker = 000001, capital = 1e6, 
                 limitPrice = NA, orderFrom = 94545, orderLast = 600, 
                 costIn = 0.001, market = 'SHSZ')

## sell ##
dfLogSold = MarketSell(dir = dir, date = 20141014, orderTime = 140001, 
                       dfLog = dfLog, costOut = 0.001, market = 'SHSZ')
                       
## market worth ##
PortfolioWorth(dir = dir, df = dfLogSold, date = 20141014, time = 145900, 
               market = 'SHSZ')

TickExec documentation built on May 2, 2019, 9:58 a.m.