Datasim Financial Forums Forum Index


 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Exercises Chapter 6

 
Post new topic   Reply to topic    Datasim Financial Forums Forum Index -> Finite Difference Methods in Financial Engineering (Duffy)
View previous topic :: View next topic  
Author Exercises Chapter 6
JLMARTIN



Joined: 30 Jul 2012
Posts: 14

PostPosted: Sun Sep 23, 2012 5:33 pm    Post subject: Reply with quote

understood!

thank you Daniel
Back to top
View user's profile Send private message
Cuchulainn



Joined: 18 Dec 2006
Posts: 607
Location: Amsterdam, the Netherlands

PostPosted: Sun Sep 16, 2012 6:45 pm    Post subject: Reply with quote

Hi JL,
Since this is 1 factor then the norm just becomes the absolute value of df/dy.

Problem is we don't know y. So some heuristics.

Ex.

say df/fy = 1/y^2. let's assume y > 0.7 on [0, 0.2] (normally see this from iterated values of y_{k} )
then h < 2y^2 on interval [0, 0.2]. Then convergence if h < 2(0.7)^2.

So, something similar in you case.

hth

Daniel
Back to top
View user's profile Send private message Send e-mail Visit poster's website
JLMARTIN



Joined: 30 Jul 2012
Posts: 14

PostPosted: Sun Sep 09, 2012 5:46 pm    Post subject: Reply with quote

Thank you Daniel for your help

for the first test case, I'm using

T=3
h=0.01
Tolerance=0.001
max iterations=1000

If I use 6.43, and given that I'm using the test case 2, what would be the condition for the convergence? If I use the L2 norm, isnt df/dy=(1/3)*t*y^(-2/3)? but in which should I apply the condicion ||df/dy||*h<2?

Regards
Back to top
View user's profile Send private message
Cuchulainn



Joined: 18 Dec 2006
Posts: 607
Location: Amsterdam, the Netherlands

PostPosted: Mon Aug 20, 2012 5:57 pm    Post subject: Reply with quote

Hi JL,

1.- in the first test case, you give as initial condition the value in t=1: y(1)=1. I find problems when dealing with it, since I can't apply the algorigthms... how am I supposed to deal with it?

DD In principles it's just a different start point. Can you take t' = t - 1.

2.- While with test case number 2 I find that the exact solution is prety similar to those offered by the numerical methods applied (i.e predictor-corrector and runge-kutta orders 2 and 4), in the test case 1, when I choose a large T (like T=3) the exact solution goes way quickly...

DD The exact solution goes to the value 2 when T gets big.
How many mesh points are you taking?

Adaptive meshing would use eq. (6.43) to find the correct meshe size.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Cuchulainn



Joined: 18 Dec 2006
Posts: 607
Location: Amsterdam, the Netherlands

PostPosted: Thu Aug 09, 2012 11:56 am    Post subject: Reply with quote

Hi JL,
Sorry, I was away. I will get back to you.
D
Back to top
View user's profile Send private message Send e-mail Visit poster's website
JLMARTIN



Joined: 30 Jul 2012
Posts: 14

PostPosted: Thu Aug 09, 2012 7:29 am    Post subject: Reply with quote

Hi

no news? Sad
Back to top
View user's profile Send private message
JLMARTIN



Joined: 30 Jul 2012
Posts: 14

PostPosted: Mon Jul 30, 2012 3:26 pm    Post subject: Exercises Chapter 6 Reply with quote

hi Daniel

I have a couple of questions regarding chapter 6 exercises, I hope you can help me

1.- in the first test case, you give as initial condition the value in t=1: y(1)=1. I find problems when dealing with it, since I can't apply the algorigthms... how am I supposed to deal with it?

2.- While with test case number 2 I find that the exact solution is prety similar to those offered by the numerical methods applied (i.e predictor-corrector and runge-kutta orders 2 and 4), in the test case 1, when I choose a large T (like T=3) the exact solution goes way quickly...

is this the expected behaviour?

Thank you for your help
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Datasim Financial Forums Forum Index -> Finite Difference Methods in Financial Engineering (Duffy) All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group