Re: [R-SIG-Finance] sufficient n for a binomial option pricing model

2012-09-06 Thread Smith, Dale
One way to terminate is to look at the consecutive differences between
the averages and terminate if the difference is less than your
tolerance. However, you should guard against the case where the
consecutive differences are never less than the tolerance. In this case,
just put in a maximum number of steps n and log the last average, the
number of steps, and a message. This allows the user to determine
whether they want to accept or reject the result.

Thanks,
Dale Smith, Ph.D.
Senior Financial Quantitative Analyst
Risk & Compliance
Fiserv.
107 Technology Park
Norcross, GA 30092
Office: 678-375-5315
Mail: dale.sm...@fiserv.com
www.fiserv.com

-Original Message-
From: r-sig-finance-boun...@r-project.org
[mailto:r-sig-finance-boun...@r-project.org] On Behalf Of J Toll
Sent: Thursday, September 06, 2012 10:25 AM
To: r-sig-finance@r-project.org
Subject: [R-SIG-Finance] sufficient n for a binomial option pricing
model

Hi,

I have a question regarding the selection of n, the number of time
steps, in a binomial option pricing model.  I suppose my question is not
strictly related to R.  As larger values should be more accurate, what
I've read on the subject simply suggests that you use a sufficiently
large value for your purposes.  So I've been trying to evaluate what is
a sufficiently large value of n for my purposes.  Is there any rule of
thumb regarding the value of n?

When using the fOptions package CRRBinomialTreeOption function, with
varying n, the price oscillates back and forth converging on a price.
This can be clearly seen through plotting.

require(fOptions)

x <- function(n) {

  CRRBinomialTreeOption(TypeFlag = "ca",
S = 50,
X = 50,
Time = 1/12,
r = 0.02,
b = 0.02,
sigma = 0.18,
n = n)@price
}

y <- sapply(1:100, x)   # mean(y) == 1.079693
plot(y)

Given this oscillation, my question is whether it would be "better" to
compute two prices using two smaller, consecutive values of n rather
than one large value?  Or is there some other better way?

For example, using n =1000 or 1001, the option prices are within 5
hundredths of a cent, but the calculation is extremely slow for either.

x(1000)# 1.077408
x(1001)# 1.077926

mean(sapply(1000:1001, x))  # 1.077667

Comparatively, taking the mean of n= 40 and 41 yields a value very close
to the middle of the range, yet is much faster.

mean(sapply(40:41, x)) # 1.0776

It seems like averaging two smaller, consecutive values of n is
basically as accurate and far faster than using large values of n.  I
was hoping someone might have some insight into why this might or might
not be a valid approach.  Thanks.


James

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions
should go.

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.


Re: [R-SIG-Finance] Free Course "Introduction to Computational Finance and Financial Econometrics"

2012-08-24 Thread Smith, Dale
Hi Mark,

 

Just for everyone else's info, Machine Learning uses Octave. I took the
opportunity to learn a bit of Octave and got credit for the course. I
liked the lectures myself and learned a lot. It was paced well for
people with jobs and I also found the projects to be interesting and a
bit challenging. I worked hard on parallelizing all of my code - I
didn't use for loops unless absolutely necessary. Additionally, all the
grading was automated. An Octave script is used to manage the
submissions, and was pass/fail.

 

I understand that there were enrollees from every country except North
Korea. I wonder how people in emerging countries will use their new
knowledge?

 

I'm looking forward to the Computing for Data Analysis course, which
uses R. Another course, Data Analysis (using R as well), seems to build
on Peng's course.

 

https://www.coursera.org/#course/dataanalysis

 

I would say investigate, enroll, and un-enroll if you aren't interested.
That's the beauty of the system - it's free, and these aren't college
credits. If you choose to get the certificate, turn it over to your
employer.

 

And as a (hopefully) future university instructor, I found that this
experience opened my mind to online learning. Faculty could

* Ask students to enroll online after the first day of on-campus
class (and provide evidence of enrollment).

* Meet with the class twice a week for discussions, go over the
lectures, and help with learning Octave/R/etc.

* Students provide the instructor with screenshots to show they
have completed the work, and submit their work for independent review by
the instructor.

* To obtain full college credit, students then complete a
project of their own, using what they have learned in the course along
with Octave/R/etc.

Any college without the resources to add data analysis, computing with
data, machine learning, or other such courses should consider this as a
cost-effective way of expanding their offerings.

 

Thanks,

Dale Smith, Ph.D.

Senior Financial Quantitative Analyst

Risk & Compliance

Fiserv.

107 Technology Park

Norcross, GA 30092

Office: 678-375-5315

Mail: dale.sm...@fiserv.com

www.fiserv.com <http://www.fiserv.com/> 

 

 

On Fri, Aug 24, 2012 at 7:43 AM, Smith, Dale 
wrote:

I searched the third quarter archives for any mention of this, and
didn't find anything. So here goes. Eric Zivot is using R in the course.



https://www.coursera.org/#course/compfinance



I highly recommend Coursera. I took Machine Learning this past spring
and highly recommend it and other courses. Alas, I can't sign up as I'm
signed up for Computing for Data Analysis (another course using R).



https://www.coursera.org/#course/compdata



Thanks,

Dale Smith, Ph.D.

Senior Financial Quantitative Analyst

Risk & Compliance

Fiserv.

107 Technology Park

Norcross, GA 30092

Office: 678-375-5315

Mail: dale.sm...@fiserv.com <mailto:dale.sm...@fiserv.com>

www.fiserv.com <http://www.fiserv.com/>




[[alternative HTML version deleted]]

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions
should go.




[[alternative HTML version deleted]]

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.


[R-SIG-Finance] Free Course "Introduction to Computational Finance and Financial Econometrics"

2012-08-24 Thread Smith, Dale
I searched the third quarter archives for any mention of this, and
didn't find anything. So here goes. Eric Zivot is using R in the course.

 

https://www.coursera.org/#course/compfinance

 

I highly recommend Coursera. I took Machine Learning this past spring
and highly recommend it and other courses. Alas, I can't sign up as I'm
signed up for Computing for Data Analysis (another course using R).

 

https://www.coursera.org/#course/compdata

 

Thanks,

Dale Smith, Ph.D.

Senior Financial Quantitative Analyst

Risk & Compliance

Fiserv.

107 Technology Park

Norcross, GA 30092

Office: 678-375-5315

Mail: dale.sm...@fiserv.com  

www.fiserv.com  

 


[[alternative HTML version deleted]]

___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should 
go.