Is there a function equivalent to "isnan" that works for financial time series (fints) input arguments?

Hi,
I am trying to replace NANs with a number 0 (zero) in a financial time series object (pnl), that calculates the profit and loss for a trading algorithm.
(I need to replace the NANs with zeros to calculate the cumulative sum of the profits and losses using the cumsum function. )
Instead, I get the following error message:
"Undefined function 'isnan' for input arguments of type 'fints'."
Please help.

回答 (1 件)

tsobj = fints(dates, data) constructs a financial time series object. Thus, you have to do something like
tsobj = fints(dates, data)
isnan( tsobj.data )

カテゴリ

ヘルプ センター および File Exchange で MATLAB についてさらに検索

タグ

質問済み:

2013 年 12 月 19 日

回答済み:

2013 年 12 月 19 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by