1

I am using this function on matlab

[ProbData,HazData] = cdsbootstrap(ZeroData,MarketData,Settle,[],[],[],[],[],[],0.25)

and it is giving me an error because it dose not understand the [ ].

I want to keep the default inputs from 4-->9 and change the ninth input to 0.25. What should I put instead of the [ ]?

2
  • What are "the default inputs from 4-->9"? A little bit more context would be fine. Commented May 8, 2014 at 12:00
  • According to the help this function only takes 3 arguments, plus name value pairs. Which Name/Value pair are you trying to change to 0.25? The possible ones are also listed on that site. Commented May 8, 2014 at 12:17

1 Answer 1

2

The function cdsbootstrap uses matlab's very common Name/Value pair syntax. Read the first few lines here:

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.

So if you wanted ALL default values, you would use the call:

[ProbData,HazData] = cdsbootstrap(ZeroData,MarketData,Settle);

If you wanted to change one of these possiblities you would simply include the name and value, all names omitted are set to defaults. Based on your value of 0.25 I'm going to assume you are trying to set the RecoveryRate since 0.25 is close to the default.

[ProbData,HazData] = cdsbootstrap(ZeroData,MarketData,Settle,'RecoveryRate',0.25);

Ref:

http://www.mathworks.com/help/fininst/cdsbootstrap.html

Sign up to request clarification or add additional context in comments.

1 Comment

('RecoveryRate',0.25) worked ,i really appreciate it thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.