- Traden4Alpha
**Posts:**23951**Joined:**

It all comes down to whether there can be (should be!) a branch of math in which functions can return sets instead of scalars. I would imagine that even dunrewpp admits that a quadratic equation often has two solutions and that he would not insist that the only possible definitions for quadratics require taking only the positive branch of the solution.

I was reading it yesterday, and I liked the remark that the inductive heuristic method might not converge to the actual solution. Frenchman showed that different initial guesses give different outcomes, and then someone else showed the bounds for the initial condition that would guarantee convergence.

- Traden4Alpha
**Posts:**23951**Joined:**

Hmmm... Isn't this the kind of math that lets one "prove" that housing prices can only go up?Back to topic.Nothing to do with pdes or numerics but simple relationship between credit ratings over one period and ratings over another period results in exponential of a transition prob matrix.

So we can now blame the credit crisis on software engineers!

P

Yes, did they use the Python/APL approach? I wonder in which language they do MBS. A little knowledge is a dangerous thing.

Your remark is a very good example; From theinfinitesmial generator matrix[$]Q[$] we can compute the 1-steptransition probabilitymatrix [$]P[$]:

[$]P(t, t + dt) = I + dtQ + o(dt)[$]

Now compute to [$]s = t + mdt[$] (m-period) to get a matrix polynomial (or is it polynomial matrix ) and then let [$]m[$] go very big to get

[$]P(t, s) = e^{(s-t)Q}[$]

This can now be computed by one of the 19 methods of Moler and Van Loan.

I have not given any definitions of the italicized words; for maximum flexibility you can fill in your own.

https://en.wikipedia.org/wiki/State-transition_matrix

What if the entire notion that a transition probability even exists is false?

- Cuchulainn
**Posts:**63233**Joined:****Location:**Amsterdam-
**Contact:**

Not that I know of; the original context from what I took from Paul's post was forHmmm... Isn't this the kind of math that lets one "prove" that housing prices can only go up?Back to topic.Nothing to do with pdes or numerics but simple relationship between credit ratings over one period and ratings over another period results in exponential of a transition prob matrix.

So we can now blame the credit crisis on software engineers!

P

Yes, did they use the Python/APL approach? I wonder in which language they do MBS. A little knowledge is a dangerous thing.

Your remark is a very good example; From theinfinitesmial generator matrix[$]Q[$] we can compute the 1-steptransition probabilitymatrix [$]P[$]:

[$]P(t, t + dt) = I + dtQ + o(dt)[$]

Now compute to [$]s = t + mdt[$] (m-period) to get a matrix polynomial (or is it polynomial matrix ) and then let [$]m[$] go very big to get

[$]P(t, s) = e^{(s-t)Q}[$]

This can now be computed by one of the 19 methods of Moler and Van Loan.

I have not given any definitions of the italicized words; for maximum flexibility you can fill in your own.

https://en.wikipedia.org/wiki/State-transition_matrix

What if the entire notion that a transition probability even exists is false?

Of course, you are free to believe Markov chains only exist in mathematicians' heads.

I am trying to stay on-topic In the face of noise and disingenuous remarks. This once precise (and top) thread here is quickly becoming fubar.

Step over the gap, not into it. Watch the space between platform and train.

http://www.datasimfinancial.com

http://www.datasim.nl

http://www.datasimfinancial.com

http://www.datasim.nl

If you'd readWhat if the entire notion that a transition probability even exists is false?

P

- Traden4Alpha
**Posts:**23951**Joined:**

Markov chains are great for simple non-adaptive systems. But I seem to recall that their long-term state dynamics consist of exponential growth forever (e.g., housing), exponential decay to zero, with the potential for some oscillations within the exponential growth or decay envelope. There aren't a lot of systems that show such behavior in the long-term, especially in economics. But, whatever...Not that I know of; the original context from what I took from Paul's post was forHmmm... Isn't this the kind of math that lets one "prove" that housing prices can only go up?Back to topic.

Yes, did they use the Python/APL approach? I wonder in which language they do MBS. A little knowledge is a dangerous thing.

Your remark is a very good example; From theinfinitesmial generator matrix[$]Q[$] we can compute the 1-steptransition probabilitymatrix [$]P[$]:

[$]P(t, t + dt) = I + dtQ + o(dt)[$]

Now compute to [$]s = t + mdt[$] (m-period) to get a matrix polynomial (or is it polynomial matrix ) and then let [$]m[$] go very big to get

[$]P(t, s) = e^{(s-t)Q}[$]

This can now be computed by one of the 19 methods of Moler and Van Loan.

I have not given any definitions of the italicized words; for maximum flexibility you can fill in your own.

https://en.wikipedia.org/wiki/State-transition_matrix

What if the entire notion that a transition probability even exists is false?credit ratingsand state changes. And that's where this stuff is used. And in many may other areas it would seem. But please correct me if I am wrong.

Of course, you are free to believe Markov chains only exist in mathematicians' heads.

I am trying to stay on-topic In the face of noise and disingenuous remarks. This once precise (and top) thread here is quickly becoming fubar.

As for the topic, I'm assuming it's no longer "e^5 to a few digits" but e^M and ln(M), no?

- Traden4Alpha
**Posts:**23951**Joined:**

This sounds like an analog to the non-PSD problem -- a complicated constraint on the physically or numerically feasible values of a matrix that are easily violated if one uses element-by-element estimation schemes. Is there some way to find the "nearest" infinitesimal-period matrix that creates something close to the quoted annual transition matrix? Perhaps there's a decomposition of the quoted annual transition matrix that segregates feasible and in-feasible components.If you'd readWhat if the entire notion that a transition probability even exists is false?PWOQF2then you'd know that people might quote transition matrices for a period of a year for which there is no infinitesimal-period matrix, because you can't invert e^M (and by "invert" I don't mean one "one over"!). The implication being either the transition matrix being quoted is rubbish or that whoever generates the matrix is making some sophisticated assumption about time dependence. (No, I don't believe the latter either!) Yet another reason why the proper defintion of exp(M) is important and the other one is pretty pointless!

P

P.S. I do agree that, exp(matrix M) is important. Yet exp(array A) is important, too, and is used correctly far more often than exp(matrix M) such as in image processing. What's vitally important is not to confuse the two.

- Cuchulainn
**Posts:**63233**Joined:****Location:**Amsterdam-
**Contact:**

Amen.

Step over the gap, not into it. Watch the space between platform and train.

http://www.datasimfinancial.com

http://www.datasim.nl

http://www.datasimfinancial.com

http://www.datasim.nl

- Cuchulainn
**Posts:**63233**Joined:****Location:**Amsterdam-
**Contact:**

Here's another way, again using the ubiquitous (and somewhat maligned) cubic spline S which is smooth as is S_x and S_xx.

In many cases we have only data y_0,y_1,...,y_n but no analytic form for the unknown function (but we do suspect it is smooth). So we interpolate using cubic spline S(x). So far, so good.

Now the current problems is to find the root of f(x) = log(x) - 5. We could use Newton but we don't have f'(x) (well, let's pretend we don't). Instead we solve the perturbed problem S(x) = 0 (tell me why I cannot do this?) and then apply Newton to S and _not_ to f:

xnew = x0 - S(x0) / S'(x0)

After 6 iterations

Exact 148.4131591025766

Cubic 148.41315743

// There's lots of things to do with cubic splines.

In many cases we have only data y_0,y_1,...,y_n but no analytic form for the unknown function (but we do suspect it is smooth). So we interpolate using cubic spline S(x). So far, so good.

Now the current problems is to find the root of f(x) = log(x) - 5. We could use Newton but we don't have f'(x) (well, let's pretend we don't). Instead we solve the perturbed problem S(x) = 0 (tell me why I cannot do this?) and then apply Newton to S and _not_ to f:

xnew = x0 - S(x0) / S'(x0)

After 6 iterations

Exact 148.4131591025766

Cubic 148.41315743

// There's lots of things to do with cubic splines.

Step over the gap, not into it. Watch the space between platform and train.

http://www.datasimfinancial.com

http://www.datasim.nl

http://www.datasimfinancial.com

http://www.datasim.nl

- Traden4Alpha
**Posts:**23951**Joined:**

Nice use of cubics! Perhaps people don't like them because they can be a bit wiggly and have no qualms about spitting out negative numbers. But it doesn't seem fair to layer on added constraints after the results are in.

But six iterations requiring long division with sufficient precision seems a bit of a chore for "paper and pencil"

I still like the direct multiplication approach: 1) e^2 = e*e; 2) e^4 = e^2*e^2; 3) e^5 = e*e^4. It probably uses less than half the graphite of a 6-iteration cubic method.

But six iterations requiring long division with sufficient precision seems a bit of a chore for "paper and pencil"

I still like the direct multiplication approach: 1) e^2 = e*e; 2) e^4 = e^2*e^2; 3) e^5 = e*e^4. It probably uses less than half the graphite of a 6-iteration cubic method.

- Cuchulainn
**Posts:**63233**Joined:****Location:**Amsterdam-
**Contact:**

Thank you. The idea came by chance in a sense when I was looking at cubic splines for something else.

Now, in fairness, cubic splines were never built for sparse data (such as 30-yield curve with t values in years {0.1, 1, 4. 9,30}) because mathematical convergence depends on the ratio of the max step size and all step sizes should be bounded. If not, then you get the famous overshoot phenomena.

As a follow on, the 'proxy' cubic spline can be used to approximate 1st and 2nd derivatives and in the case of [$]e^x[$] we get 148.413503 for S" for n = 300,000. This is very stable. Compare to naive numerical differentiation that leads to well-known

Last edited by Cuchulainn on February 22nd, 2017, 1:47 pm, edited 4 times in total.

http://www.datasimfinancial.com

http://www.datasim.nl

- Cuchulainn
**Posts:**63233**Joined:****Location:**Amsterdam-
**Contact:**

I don't

1. Is e given and if so how many digits are needed? (giving e is cheating?? )

2. In order to get 2-digit accuracy for [$]e^5[$] how do we avoid round off in the process?

3. How do I compute numerical derivatives?

4. You only know if your algo is good after you have done all the computations?

It is no longer a requirement to use p&p. A TI calculator is also allowed.

http://www.datasimfinancial.com

http://www.datasim.nl

- Traden4Alpha
**Posts:**23951**Joined:**

Well, if a TI calculator is allowed, then hit '5' & 'e^x' and Bob's your uncle!

If you are worried about the required number of digits of e for multiplication, then you should be worried about the required number of digits in the long division of the iteration method.

P.S. I can get e with p&p as the ratio of easily constructed Fibonacci numbers. (And as a brainteaser test for a quant, maybe the test giver expects the test taker to know e off the top of their head.)

If you are worried about the required number of digits of e for multiplication, then you should be worried about the required number of digits in the long division of the iteration method.

P.S. I can get e with p&p as the ratio of easily constructed Fibonacci numbers. (And as a brainteaser test for a quant, maybe the test giver expects the test taker to know e off the top of their head.)

- Cuchulainn
**Posts:**63233**Joined:****Location:**Amsterdam-
**Contact:**

That's your final answer? I am the only one producing results hereWell, if a TI calculator is allowed, then hit '5' & 'e^x' and Bob's your uncle!

If you are worried about the required number of digits of e for multiplication, then you should be worried about the required number of digits in the long division of the iteration method.

P.S. I can get e with p&p as the ratio of easily constructed Fibonacci numbers. (And as a brainteaser test for a quant, maybe the test giver expects the test taker to know e off the top of their head.)

BTW Fibonacci looks like a solution looking for a problem.

http://www.datasimfinancial.com

http://www.datasim.nl

- Traden4Alpha
**Posts:**23951**Joined:**

LOL!That's your final answer? I am the only one producing results hereWell, if a TI calculator is allowed, then hit '5' & 'e^x' and Bob's your uncle!

If you are worried about the required number of digits of e for multiplication, then you should be worried about the required number of digits in the long division of the iteration method.

P.S. I can get e with p&p as the ratio of easily constructed Fibonacci numbers. (And as a brainteaser test for a quant, maybe the test giver expects the test taker to know e off the top of their head.)

BTW Fibonacci looks like a solution looking for a problem.

My pen & paper days are over! I've realized that I lack an analog plotter interface -- even writing my name in a guest register results in hand cramps now.

I did create a quickie Excel spreadsheet to do the three multiplications, but it's not very interesting. (I thought about creating an .XLS that does the multiplication one digit at a time but it seems like an exercise for the student).

BTW, how did you know how many bits you needed for your variables? For estimating e^N with D decimal digits, what values of N and D permit the use of floats and what value require doubles (or more)????

GZIP: On