Examples

Example: Two Sample t-Test

January 31, 2012 | Al-Ahmadgaid Asaad

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 | Al-Ahmadgaid Asaad

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 | Joshua Ulrich

When optimizing leverage space portfolios, I frequently run into the issue of one or more f$ ([Max Loss]/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 | Joshua Ulrich

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 | Joshua Ulrich

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 | Joshua Ulrich

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 | Joshua Ulrich

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 | Joshua Ulrich

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 | Joshua Ulrich

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 | Joshua Ulrich

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...]

Testing RSI(2) with R, First Steps

April 13, 2009 | Joshua Ulrich

This is the first of a series of posts that will demonstrate how to build, test, and implement a trading strategy using my favorite FOSS, R. I chose the RSI(2) strategy because it has gotten considerable attention on trading blogs over the past 6 mont...
[Read more...]

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)