Tag Archives: MA

I am now Researching the best possible moving average models aka MA with R source with video and webinar coming soon

I am now Researching  the best possible moving average models aka MA with R source with video and webinar coming soon

These video source code video walkthroughs will be posted for Quantlabs.net Premium members so get access here.

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

The secret shortcut to valuation when regular analysis fails: Using Monte Carlo and a ARIMA models with MA AR(1) or AR(2) simulation

The secret shortcut to valuation when regular analysis fails: Using Monte Carlo and a ARIMA models with MA AR(1) or AR(2) simulation

Hi there,

Are you interested in accurately valuing complex options and other derivatives … as well as fixed income instruments?

And doing it faster than your competition?

It’s not very straightforward to get an accurate valuation, you know. That’s because you’ll never have enough data to get a perfect picture of a given instrument or portfolio. You have to “approximate” the data or your computations will never finish!

Unless you know how to use the Monte Carlo method, of course. It’s an ingenious shortcut not many traders understand. Here’s how it works:

1. First you define a domain of possible inputs. Then …
2. Generate inputs randomly from a probability distribution over the domain. And …
3. Perform a deterministic computation on the inputs.
4. Finally, you aggregate the results.

Done correctly, this method is surprisingly accurate. Not just for individual instruments, but entire portfolios. You can even simulate an entire stock market to practice trading stocks without risk!

In fact, for situations with more than 3 or 4 degrees of freedom, formulae such as Black Scholes (i.e. analytic solutions) don’t even exist, while other numerical methods such as the Binomial options pricing model and finite difference methods face several difficulties and are impractical.

In these cases, Monte Carlo methods converge to the solution more quickly, require less memory and are easier to program.

The programming gets even easier with my latest offering to Premium members. You see, I’m just finishing up a walkthrough video that explains what you need to know about using Monte Carlo simulations.

It’s absolutely essential if you want to minimize your learning curve for this very powerful tool. Especially when I’m including all the relevant source code in R for you. It doesn’t get any easier than this!

Get get access to this tutorial now:

–>http://quantlabs.net/dlg/sell.php?prodData=m%2C3<–

Other videos will cover Stochastic Volatility … Markov Chain … Autoregressive (AR(1)) and GARCH forecasting … Bootstrapping … Dynamic Linear Modeling … and more!

Learn about the rest of Premium benefits including our HFT and Algo Development courses, software tool kits, and more!

–>http://quantlabs.net/quant-member-benefits/ <–

Good trading,

Bryan

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

R source code for trading script with update portfolio, position size, MA, cross over, SMA, optimize parameters

R source code for trading script with update portfolio, position size, MA, cross over, SMA, optimize parameters

 

This will be a webinar part 2 based on part 1 including the same steps as at:

Webinar with R trading with complete workflow to build strategy, plot, P&L, rules, indicator, signal, portfolio summary ,trade signal stats

In addition, I will show:
1.    How to apply a strategy
2.    How to update a current portfolio
3.    Plot moving average crossover performance
4.    Position size
5.    Plot fixed dollar moving average crossover performance
6.    Show strategy transactions
7.    Plot average crossover with percent equity entries
8.    Passing parameters at apply time
9.    Plot an X month simple moving average system
10.    Optimize parameters and plot performance metric

Be on the lookout for this strategy as we will announce the demo date via email to to the public. It will be very limited as it will only be demonstrated once. After that, it will only be available to our Premium Members.
UPDATE: There will be 3 separate webinars for each part to be demoed.

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Moving average (MA) is useful and basis of many indicators. I like to understand MA itself a bit deeper, beyond quant analytics

Moving average (MA) is useful and basis of many indicators. I like to understand MA itself a bit deeper, beyond quant analytics

==

 

The ma is approximately equivalent to to exponential smoothing for
lambda = 2/(n+1). Once you make that approximation, then, since exponential smoothing is equivalent to an arima(0,1,1) for a certan value of theta ( I forget the relation ) and the arima(0,1,1) is equivalent to a random walk plus noise model ( dynamic linear model.kalman filter. i forget that relation also ). So, once you make the first approximation, there are many ways to go. If you need references, let me know.

==

 

I couldn’t imagine that ema is related to a dynamic model with noise. I will have a look at arima(0,1,1) whatever this is, as soon as I’m back in front of PC.

 

the equivalence between exp smoothing and the arima(0,1,1) is
discussed to an okay degree in the box-jenkins text. the relation between arima(0,1,1)
and the random walk plus noise dlm is discussed in andew harvey’s time series book
( I forget the name but it’s blue and “structural models” is in the title, ~ 1990 ) but also
to just an okay degree.

As it turns out, the arima(0,1,1) can be written as two different dlm/kalman filter models. one is the random walk plus noise using harvey’s framework ( i.e: the more standard one where there are two sources of error, one source in the observation equation and the other source in the system equation ) . the other is called the single source of error random walk plus noise model ( SSOE ) which is discussed in ord, snyder and koehler ( jasa, 1997 ). This single source of error model turns out to cover a larger parameter space when compared to the multiple source of errror ( MSOE ) model. The SSOE dlm is also discussed in a university of monash working paper that I can send you offline if you send me your email address. good luck.

==

 

You might find chapter 11 of the excellent book “Analysis of Financial Time Series”, by Ruay Tsay, called “State-Space Models and Kalman Filter”, relevant:http://faculty.chicagobooth.edu/ruey.tsay/teaching/fts3/

 

===

Is the time series important for quant job? I am fresh graduate and considering whether it is worth to learn it for hunting job…

 

==

you should have started your own question about this, but I can give you a short answer anyway. Indeed, time series are central to quantitative finance, as is stochastic calculus. Concerning stochastic calculus, you can get by initially with simple computation rules, but you need to go deeper if you have to value exotic derivatives or even model interest rates.

 

==

I’m happy to see the positive and inspiring conversations. And, Jean-Victor, the reference you kindly cited, I just started to have a look, and it seems very elaborate, great.

 

==

Although not a quantitative perspective, I would start with understanding why a moving average works and how it is related to the price discovery process.

 

==

The view point or the angle of the price discovery process is absolutely important in practice. Doesn’t it require more game theoretic consideration, though I might be totally senseless?

 

==

I found your comment interesting. Could you elaborate
a little more. Thanks.

 

==

There is an old saying, the world is made up of two kinds of people; those who divide the world into two kinds of people and those who don’t.

To me there are two ways to approach thinking about algorithms (there are a lot of variations but most developers I have known fall into one category or the other).

You can go the Neural Network, AI, data mining, etc route and find algorithms that work but you really don’t know why or you can try to find the fundamental reason why an algorithm works. Neither one is better than the other, I just happen to be one of those who only trades algorithms where I understand what I am modelling and why the model works.

A moving average works for the same reason a lot of things look better once you have missed your chance the first time. You are at a party and you see an attractive person you would like to talk with. You hesitate and then someone else is talking with the person and it looks like you won’t get a second chance.

Suddenly the person is alone again but again you hesitate (but for a shorter period of time) and then yet again, they are engaged in conversation with a new person. When once more they are alone, you rush over and begin talking with them so as not to miss the opportunity again.

Price is the attractive person, that person talking to someone else is price moving away from your opportunity (the chance to take the trade). Each time your opportunity arises, you hesitate for a shorter period of time (i.e. you move the price you are willing to pay toward the higher price).

Think of this dynamic played out over thousands of traders. When prices are rising and you want to buy, you must find a seller. If you don’t like the price you can get and price moves away from you, you do not trade.

You tell yourself, price will come back but it doesn’t quite get to you. You hesitate again and price moves away again. This process repeats itself until finally you decide to pay up and enter the trade. But remember there are thousands of traders who are also hesitating and a certain number will, at each point along the price curve, pay the higher price thus forcing the price even higher again.

Eventually price reaches a place where there are no buyers willing to pay and so the process reverses itself but now with the sellers demanding trades. Some will enter immediately but some will wait…

When you understand the process it makes it easier to model it, at least it does for me.

==

 

That was REALLY interesting. What makes it a more difficult
is that you have two types of people within that crowd: the people who are buying ( they think she’s attractive ) to jump on the trend and the people who are selling ( she’s talking to every guy. no reason to think she’ll like me ) because they are expecting reversal. But still I like your analogy a lot. I also agree with you preferring to “understand why a model works”.

 

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Endowment & Foundation Forum, September 21-23, 2011 at the Boston Marriot Long Wharf, in Boston, MA.

Endowment & Foundation Forum, September 21-23, 2011 at the Boston Marriot Long Wharf, in Boston, MA.

The 13th Annual Endowment and Foundation Forum will provide a forum for the free exchange of ideas concerning portfolio planning and investment strategies. Rather than focusing on a particular investment style, this endowment and foundation conference will tackle the issues that are most germane to the nation’s endowments and charitable foundations by examining critical investment topics, as well as the need to align fiscal strategy with the goals of a particular organization. Participants and delegates will speak on a range of issues, including the necessity for non-profit governance for endowments, means of capturing alpha in a portfolio, methods of choosing money managers, and problems of ethics and liability in fiduciary planning, as well as addressing the pros and cons of investing in equity, fixed income, alternative, and real estate products. By targeting the industry sector, guest speakers and participants can gain a greater understanding of how their organizations can utilize and dovetail with particular investment strategies.

Register for this conference by visiting us online at opalgroup.net or please send me a message if you are interested in discussing further. The standard registration rate is still available and we are offering complimentary registrations to Endowment/Foundation and Consultants.

If you would like more information about attending this event, please do not hesitate to give us a call 212-532-9898.

Thank you for your consideration and we hope to see you in Boston!

follow us on twitter:
http://twitter.com/OpalFinancial

 

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Endowment & Foundation Forum, September 21-23, 2011 at the Boston Marriot Long Wharf, in Boston, MA.

Endowment & Foundation Forum, September 21-23, 2011 at the Boston Marriot Long Wharf, in Boston, MA.

The 13th Annual Endowment and Foundation Forum will provide a forum for the free exchange of ideas concerning portfolio planning and investment strategies. Rather than focusing on a particular investment style, this endowment and foundation conference will tackle the issues that are most germane to the nation’s endowments and charitable foundations by examining critical investment topics, as well as the need to align fiscal strategy with the goals of a particular organization. Participants and delegates will speak on a range of issues, including the necessity for non-profit governance for endowments, means of capturing alpha in a portfolio, methods of choosing money managers, and problems of ethics and liability in fiduciary planning, as well as addressing the pros and cons of investing in equity, fixed income, alternative, and real estate products. By targeting the industry sector, guest speakers and participants can gain a greater understanding of how their organizations can utilize and dovetail with particular investment strategies.

Register for this conference by visiting us online at opalgroup.net or please send me a message if you are interested in discussing further. The standard registration rate is still available and we are offering complimentary registrations to Endowment/Foundation and Consultants.

If you would like more information about attending this event, please do not hesitate to give us a call 212-532-9898 or email us

Thank you for your consideration and we hope to see you in Boston!

 

follow us on twitter:
http://twitter.com/OpalFinancial

 

 

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!