ComputePortfolioReturns

포트폴리오에 대한 과거 일정 기간 동안의 수익률을 계산합니다.

Function specification

ComputePortfolioReturns(entities, date_from, date_to, weight,
                rebalancing_freq="daily", rebalancing_date=0, transaction_cost=0)

Parameters

Parameter

Type

Description

entities

list of strings

종목명 리스

date_from/date_to

date

수익률 계산 기간

weight

string

비중 결정 방식 ( "equal", "value", "relevance" )

rebalancing_freq

string

리밸런싱 주기 ( "daily","monthly", "quarterly", "semi-annual", "annual", "no" )

rebalancing_date

int

the i-th date of portfolio rebalancing within the given frequency. For example, if (quarterly, 2) is given, it means the portfolio is to be rebalanced at the end of 2nd month in a quarter, e.g., Feb 28, May 31, Aug 31, and Nov 30. Similarly, if (monthly, 25) is given, the portfolio will be rebalaned at the 25th of every month. The default value is zero, which indicates the last date of a cycle.

transaction_cost

float

거래 비용 (%) ex) 1.0 -> 1.0%

Result

pageResult:PortfolioReturns

Examples

> ComputePortfolioReturns([삼성전자, LG전자, 네이버], 2013-01-01, 2018-12-31, "equal")
> ComputePortfolioReturns(상위(인공지능 관련 기업,10), 2013-01-01, 2018-12-31, "equal")
> ComputePortfolioReturns(시가총액 > 1000000000000, 2013-01-01, 2018-12-31, "equal")
> ComputePortfolioReturns([삼성전자, LG전자, 네이버], 2013-01-01, 2018-12-31, "equal", "daily")
> ComputePortfolioReturns([삼성전자, LG전자, 네이버], 2013-01-01, 2018-12-31, "equal", "no")
> ComputePortfolioReturns([삼성전자, LG전자, 네이버], 2013-01-01, 2018-12-31, "equal", "monthly")

Last updated