## Optimal f amibroker

Note that Josh has a blog post on how to create the JPT , so you might be able to only use R, should you want to experiment with the Leverage Space Model (I am not sure the java app is freely available).

## Calculating Position Size with Optimal F - George Pruitt

To use any smart (non-exhaustive) optimizer in AmiBroker you need to specify the optimizer engine you want to use in the AFL formula using OptimizerSetEngine function.

### Re: [amibroker] Optimal F - World Investment

If the problem is relatively simple and 6555 tests are enough to find global max, 5x6555 is more likely to find global maximum
because there are less chances to be stuck in local max, as subsequent runs will start from different initial random population

#### Vince's Optimal f and the Leverage Space - blog

The plugin implements Global variant of search with several restarts with increasing population size
comes with full source code (inside ADK folder)

One interesting thing to note is the fact that some f-values can be assigned to 5 , which basically means that the component does not add value to the portfolio with regards to the growth rate, which maximum is attained when excluding it.

One of the main problem usually raised with the concept of optimal f is that trading for growth rate optimization is often not realistic, as it generates untenable levels of drawdown and volatility. Most investors, traders or managers would happily give up some return to stay in their acceptable levels of volatility and drawdown.

This post is hugely beneficial for me. I am doing some research on LSPM. I know the post is old but hope that you will see my question. My question is: You say (in the section with drawdown constraints) that : 8776 The monthly geometric mean return drops to % 8776 The R-Session file however shows a value of for \$G or 8775 bestvalit 8776 . Where does the % come from. In your first example (without drawdown) your 8775 bestvalit 8776 and geometric mean return is the same

AmiBroker's 8D chart viewer offers total viewing capabilities with full graph rotation and animation. Now you can view your system results from every conceivable perspective. You can control the position and other parameters of the chart using the mouse, toolbar and keyboard shortcuts, whatever you find easier for you. Below you will find the list.

Most of the mathematical formulas supporting the model are in the book Leverage Space Trading Model. I will not paraphrase the book and reproduce all the formulas here but I will refer to some of them. Getting the book is probably a good idea for a better understanding of the concepts.

The trading application of the Leverage Space Model is presented as a generalisation of the Kelly formula, which is well illustrated by the coin-toss betting example (as per Vince 8767 s paper ).

The optimal leverage for the Dunn track record can be derived from Optimal f = : Optimal leverage = / = . This effectively means that an investor would have achieved the highest possible final equity investing in Dunn by resetting the notional account size to 668% of the actual account size, every month (this is theoretical as it ignores the (im)practicality of this and impact of fees, etc.).

Another aspect worth looking into is how useful the model is in a forward-looking mode (ie to determine optimal f/leverage to apply to each component for the next periods) and how this can be used/configured (over the whole history available at that time or over a rolling optimization window? Which length of data to use in that window?). This would obviously be dependent on how stable the component returns are over time (like for any aspect of back-testing).

I had a reader of the blog ask how to use Optimal F.  That was really a great question.  A few posts back I provided the OptimalFGeo function but didn 8767 t demonstrate on how to use it for allocation purposes.  In this post, I will do just that.

Tribes is adaptive, parameter-less version of PSO (particle swarm optimization) non-exhaustive optimizer. For scientific background see:
http:///Tribes_7556_

pardo 8767 s updated book on optimisation is a pretty good follow-up to his original book. It is a very sensible read for optimisation and evaluation strategies. it can be also useful reading aloud when the mother-in-law pops round for Sunday afternoon tea and scones (just passing you uderstand, as one does when on a thirty mile re-route). Pardo 8767 s book is not quite thick enough for propping up the sofa if a leg falls off but luckilly the mother-in-law 8767 s is!!

The High/Low method attempts to approximate the early DeVilliers method of point and figure charting which used intra-day data. By using highs in an up-trend and lows in a down-trend the method is more responsive to trend changes. It is suited to short-term point and figure charts: there are too many false signals for long-term charting.

variable - is normal AFL variable that gets assigned the value returned by optimize function.
With normal backtesting, scanning, exploration and comentary modes the optimize function returns default value, so the above function call is equivalent to: variable = default

I thought i had read Vince 8767 s book thoroughly but i am all set to read it again as i must have been making a cup of coffee when i should have read the chapter that involved risking more than one 8767 s equity capital. i only do that with my weekly shopping bill!

After entering the formula just click on Optimize button in Automatic Analysis window. AmiBroker will start testing all possible combinations of optimization variables and report the results in the list. After optimization is done the list of result is presented sorted by the Net % profit. As you can sort the results by any column in the result list it is easy to get the optimal values of parameters for the lowest drawdown, lowest number of trades, largest profit factor, lowest market exposure and highest risk adjusted annual % return. The last columns of result list present the values of optimization variables for given test.