Spezifikation
The task is to create a script / expert to analyze the results of trading on historical data.
1. Data sources – the terminal history and the report of the strategy tester (selected in the settings).
2. Initial parameters:
- data source (file name in case of strategy tester)
- date range for analysis
- the period of "post-analysis"
3. Calculated parameters:
a) for each transaction
- MAE (Maximum Adverse Excursion) of two types, including the ability to analyze the price behavior during a certain period after the closing of the transaction (specified in the parameters)
- MFE (Maximum Favorable Excursion) of two types, including the possibility of analyzing the behavior of the price during a certain period after the closing of the transaction (specified in the parameters)
- HPR (holding period returns)
- enter efficiency *
- close efficiency
- transaction efficiency
b) summary
- Sharp Ratio
- Z-score
- AHPR
4. The final result is in the form of a csv file, with a table containing rows with data for each transaction, including columns:
- tickets No
- type of trade
- volume of the trade
- the Open price
- the Close price
- opening time
- closing time
- maximum price per trade
- minimum price per trade
- time of the maximum price after the start of the trade in minutes
- time of the minimum price after the beginning of the trade in minutes
- entrance efficiency *
- Exit efficiency *
- efficiency of the trade *
- MAE
- MFE
- HPR
- MAE "extended" (on the range of "post-analysis" after the close of the transaction)
- MFE "extended" (on the range of "post-analysis" after the close of the transaction)
- time of the maximum price after the end of the transaction in minutes within the range of "post-analysis"
- the time of the minimum price after the end of the transaction in minutes within the range of "post-analysis"
In the end, the summary data is placed
* The efficiency of the entrance is calculated by the formulas:
for long positions
enter_efficiency = (max_price_trade-enter_price) / (max_price_trade-min_price_trade);
for short positions
enter_efficiency = (enter_price-min_price_trade) / (max_price_trade-min_price_trade);
The efficiency of the exit is calculated by the formulas:
for long positions
exit_efficiency = (exit_price - min_price_trade) / (max_price_trade - min_price_trade);
for short positions
exit_efficiency = (max_price_trade - exit_price) / (max_price_trade - min_price_trade);
The efficiency of the transaction is calculated by the formulas:
for long positions
trade_efficiency = (exit_price-enter_price) / (max_price_trade-min_price_trade);
for short positions
trade_efficiency = (enter_price-exit_price) / (max_price_trade-min_price_trade);
general formula
trade_efficiency = enter_efficiency + exit_efficiency-1;
Bewerbungen
1
Bewertung
Projekte
144
46%
Schlichtung
19
42%
/
16%
Frist nicht eingehalten
32
22%
Arbeitet
Projektdetails
Budget
30+ USD
Ausführungsfristen
von 3 bis 7 Tag(e)