Posts Tagged ‘ Examples ’

Example: Two Sample t-Test

January 31, 2012
By
Example: Two Sample t-Test

The recovery time (in days) is measured for 10 patients taking a new drug and for 10 different patients taking a placebo. We wish to test the hypothesis that the mean recovery time for patients taking the drug is less than for those taking placebo. The...

Read more »

Example: One Sample t-Test

January 31, 2012
By
Example: One Sample t-Test

Using the stack loss dataset, test the hypothesis that the mean of the stackloss is equal to 20 versus a two-sided alternative. Solution:Codes:Output:Interpretation: With the p-value greater than the level of significance alpha at 0.05, then we la...

Read more »

Margin Constraints with LSPM

August 1, 2010
By
Margin Constraints with LSPM

When optimizing leverage space portfolios, I frequently run into the issue of one or more f$ (/f) being less than the margin of its respective instrument.  For example, assume the required margin for an instrument is $500, f$ is $100, an...

Read more »

LSPM Joint Probability Tables

May 18, 2010
By
LSPM Joint Probability Tables

I've received several requests for methods to create joint probability tables for use in LSPM's portfolio optimization functions.  Rather than continue to email this example to individuals who ask, I post it here in hopes they find it via a Google...

Read more »

Maximum Probability of Profit

April 9, 2010
By
Maximum Probability of Profit

To continue with the LSPM examples, this post shows how to optimize a Leverage Space Portfolio for the maximum probability of profit. The data and example are again taken from The Leverage Space Trading Model by Ralph Vince.These optimizaitons take ...

Read more »

LSPM with snow

January 10, 2010
By
LSPM with snow

My last post provided examples of how to use the LSPM package. Those who experimented with the code have probably found that constrained optimizations with horizons > 6 have long run-times (when calc.max >= horizon).This post will illustrate how the s...

Read more »

LSPM Examples

January 2, 2010
By
LSPM Examples

I have received several requests for additional LSPM documentation over the past couple days and a couple months ago I promised an introduction to LSPM.In this long-overdue post, I will show how to optimize a Leverage Space Portfolio with the LSPM pa...

Read more »

RSI(2) Evaluation

June 28, 2009
By
RSI(2) Evaluation

Despite my best efforts, it's been a month since the last post of this series. The first post replicated this simple RSI(2) strategy from the MarketSci Blog using R. The second post showed how to replicate the strategy that scales in/out of RSI(2)....

Read more »

Packages featured with Inference for R

May 12, 2009
By
Packages featured with Inference for R

quantmod, TTR, and xts were (not so) recently featured on the Inference for R Blog. Inference for R is a Integrated Development Environment (IDE) designed specifically for R.The post gives an example of how to easily perform advanced financial stock a...

Read more »

RSI(2) with Position Sizing

May 1, 2009
By
RSI(2) with Position Sizing

Though it's more than two weeks later, here's the second post in the series that will demonstrate how to build, test, and implement a trading strategy with R. You can find the first post here.The first post replicated this simple RSI(2) strategy from ...

Read more »