Description

Yield = cfyield(CFAmounts, CFDates, Price, Settle,Name,Value) computes yield
to maturity for a cash flow given price with additional options specified
by one or more Name,Value pair arguments.

Input Arguments

CFlowAmounts

NINST-by-MOSTCFS matrix
of cash flow amounts. Each row is a list of cash flow values for one
instrument. If an instrument has fewer than MOSTCFS cash
flows, the end of the row is padded with NaNs.

CFlowDates

NINST-by-MOSTCFS matrix
of cash flow dates. Each entry contains the serial date of the corresponding
cash flow in CFlowAmounts.

Price

Price.

Settle

Settlement date is a serial date number or date string. Settlement
date is the date on which the cash flows are priced.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments.
Name is the argument
name and Value is the corresponding
value. Name must appear
inside single quotes (' ').
You can specify several name and value pair
arguments in any order as Name1,Value1,...,NameN,ValueN.

Note:
Any optional input of size N-by-1 is also
acceptable as an array of size 1-by-N,
or as a single value applicable to all contracts. Single values are
internally expanded to an array of size N-by-1.