Analyse historic trading data in google sheets.
- or -
Post a project like this£50(approx. $63)
- Posted:
- Proposals: 3
- Remote
- #2386905
- Expired
Description
Experience Level: Entry
I need a someone skilled in maths and google sheets scripts to analyse some data for me please.
I have a data set of 50 notional historic trades made on the crypto currency markets. I want to find out what the optimum stop loss level and trading stake would have been for maximum profit from those trades.
I have copy clipped the dataset at the end of this description, and the necessary historic market price information can be pulled using the following APi:
https://min-api.cryptocompare.com/documentation?key=Historical&cat=dataHistoday
I would like someone who can start immediately and finish within a couple of days. Ideally you should have a working knowledge of trading and financial markets.
I would like this presented as a google sheet, with a script that I can use again to analyse further data sets please.
Goal: To determine what profit the user would have made in a live trading environment.
Method: For every session since the previous reset record the pair, the entry date, and the direction in a database for that user.
Field one: PAIR
Field two: ENTRY (date)
Field three: TRADE (direction, i.e. long/short, up/down) LONG or SHORT
The entry price should be taken as the average of the open and close prices from the date that the trade was opened.
When the report page is presented after 100 attempts the app will compile a trading report based upon the set of trades.
For each trade apply what is known in trading as a trailing stop, which we will call the STOP. When the price moves by a certain amount against the direction of the trade then the trade is closed. The price at which the trade is closed is the CLOSE, and this amount must be recorded in the database.
More about trailing stops:
https://www.investopedia.com/terms/t/trailingstop.asp
To calculate whether to close the price the app must record the current STOP price, which we will initially set at 5%.
For SHORT positions, the stop will be the ENTRY price, plus 5%.
For LONG positions, the stop will be the ENTRY price, minus 5%
The app must then use an iterative process to determine the price level that the STOP is triggered. To do this it must look at each following period in sequence and determine if the STOP is activated or not.
For a SHORT position, if the H price is greater than the STOP price, then close at the STOP price and record that price as being the CLOSE price. Continue for each following period until the trade is closed.
For a LONG position, if the L price is L price is lower than the STOP price, then close at the STOP price and record that price as being the CLOSE price. Continue for each following period until the trade is closed.
Record the CLOSE prices for each of the 100 trades.
Repeat the process with a different STOP percentage, and record the CLOSE prices, do this for every stop level from 2% to 20%, in 2% increments.
We must then calculate the overall profit for each STOP percentage and record that data. The overall profit for each trade is the percentage gain or loss for each trade.
If we assume an opening balance of $1000 in available capital, we must determine the optimum amount to bet on each trade, for maximum profit. The variable is between 1% and 10%, in 1% increments.
For each of the ten data sets, calculate the optimum bet size for maximum profit.
Finally, select the dataset with the maximum profits and output results for that dataset, as percentage gain, and financial profit, and the optimum bet size and stop loss level.
DGBUSD 28/06/2017 Short -38.38% Win
XMRUSD 24/06/2017 Short -2.24% Win
I have a data set of 50 notional historic trades made on the crypto currency markets. I want to find out what the optimum stop loss level and trading stake would have been for maximum profit from those trades.
I have copy clipped the dataset at the end of this description, and the necessary historic market price information can be pulled using the following APi:
https://min-api.cryptocompare.com/documentation?key=Historical&cat=dataHistoday
I would like someone who can start immediately and finish within a couple of days. Ideally you should have a working knowledge of trading and financial markets.
I would like this presented as a google sheet, with a script that I can use again to analyse further data sets please.
Goal: To determine what profit the user would have made in a live trading environment.
Method: For every session since the previous reset record the pair, the entry date, and the direction in a database for that user.
Field one: PAIR
Field two: ENTRY (date)
Field three: TRADE (direction, i.e. long/short, up/down) LONG or SHORT
The entry price should be taken as the average of the open and close prices from the date that the trade was opened.
When the report page is presented after 100 attempts the app will compile a trading report based upon the set of trades.
For each trade apply what is known in trading as a trailing stop, which we will call the STOP. When the price moves by a certain amount against the direction of the trade then the trade is closed. The price at which the trade is closed is the CLOSE, and this amount must be recorded in the database.
More about trailing stops:
https://www.investopedia.com/terms/t/trailingstop.asp
To calculate whether to close the price the app must record the current STOP price, which we will initially set at 5%.
For SHORT positions, the stop will be the ENTRY price, plus 5%.
For LONG positions, the stop will be the ENTRY price, minus 5%
The app must then use an iterative process to determine the price level that the STOP is triggered. To do this it must look at each following period in sequence and determine if the STOP is activated or not.
For a SHORT position, if the H price is greater than the STOP price, then close at the STOP price and record that price as being the CLOSE price. Continue for each following period until the trade is closed.
For a LONG position, if the L price is L price is lower than the STOP price, then close at the STOP price and record that price as being the CLOSE price. Continue for each following period until the trade is closed.
Record the CLOSE prices for each of the 100 trades.
Repeat the process with a different STOP percentage, and record the CLOSE prices, do this for every stop level from 2% to 20%, in 2% increments.
We must then calculate the overall profit for each STOP percentage and record that data. The overall profit for each trade is the percentage gain or loss for each trade.
If we assume an opening balance of $1000 in available capital, we must determine the optimum amount to bet on each trade, for maximum profit. The variable is between 1% and 10%, in 1% increments.
For each of the ten data sets, calculate the optimum bet size for maximum profit.
Finally, select the dataset with the maximum profits and output results for that dataset, as percentage gain, and financial profit, and the optimum bet size and stop loss level.
DGBUSD 28/06/2017 Short -38.38% Win
XMRUSD 24/06/2017 Short -2.24% Win
Insides
100% (25)Projects Completed
18
Freelancers worked with
15
Projects awarded
40%
Last project
8 Feb 2024
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies