Đang Thực Hiện

Amibroker AFL Porftolio-Level Backtest

AFL Strategy Description:

EOD data portfolio-level backtest with user-specified daily, weekly, monthly, or n months rebalance.

There is a universe of approximately 100 symbols.

There are up to 10 user-defined sectors.

The user begins by defining sectors and assigning each symbol in the universe to a sector. Sector assignments are persistent between tests.

The user specifies a sector allocation as a percentage of the total portfolio $ (e.g., sector 1 = 10% target allocation; sector 2 = 12%).

The user also defines a maximum number of positions for each sector (e.g., sector 1 maxPositions = 3; sector 2 maxPositions = 4).

The user defines a simple binary permission screen (e.g. if symbol > 200d SMA, permission = true). This allows a symbol to be bought or held. When false, a position is to be sold

The user defines a simple price strength indicator (e.g., strength = 30d price change + 90 day price change + 180 day price change).

At the rebalance period, (specified in the setup above), the strategy:

- Calculates the binary permission screen for each symbol

- Calculates the strength indicator for each symbol

- For each sector, calculates the dollars allocated to it. Sector $ = total portfolio $ * sector allocation % (sector allocation % defined above)

- For each position, size of the position $ = Sector $ / maxPositions

- For each sector, rebalances by selecting the top maxPosition symbols by strength rank order AND binary permission screen.

- If a top strength-ranked symbol DOES NOT have permission screen, pass down the rank list to the next highest strength score. If there is less than maxPositions symbols which pass the permission screen in the sectors, hold the remainder of positions as cash

- Buy and sell according to this policy on the NEXT open, high, low or close (user specified)

First Milestone:


In Amibroker, download WEEKLY price history for n ETFs from Yahoo (let's say n = 9 here). I should be able to specify a list of 9 ETFs to download and you provide the ability to do so in Amibroker.

At each bar:
*For each ETF, calculate the McGinley Dynamic (MD is a smoothed MA - I will provide the version I would like you to calculate, because there are incorrect versions out there)
*If the weekly close is above the MD, BUY on the NEXT open, high, low or close. Position size = total capital/n.
*If the weekly close is below the MD, have 2 options: 1)hold cash = total capital/n OR 2)SELL SHORT on the NEXT open, high, low or close. Position size again = total capital/n.

Kỹ năng: Lập trình C++

Xem thêm: portfolio rebalance amibroker, afl amibroker, sma afl, amibroker rebalance portfolio, backtest afl, buy sell afl, amibroker backtest buy hold, low level backtest amibroker, amibroker backtest afl, user tests, top rank list, top down programming, to level, strength programming, simple binary, programming the universe, programming symbols, programming symbol, programming portfolio, programming in binary, level 2, high level programming, highest ranked, binary target, binary programming

Về Bên Thuê:
( 0 nhận xét ) Encinitas, United States

Mã Dự Án: #1033227

Đã trao cho:

AlexSokhanych

Hi! I am proffesionall programmer for Metatrader,TradeStation, Multicharts, Amibroker API, InteractiveBrokers API, C++, VB for more than 10 years. Best regards, Alexander

$700 USD trong 10 ngày
(1 Đánh Giá)
0.0

2 freelancer đang chào giá trung bình $475 cho công việc này

Arif0605066

Hi, I can do it with in [url removed, login to view] open chat for details.

$250 USD trong 4 ngày
(0 Đánh Giá)
0.0