Find Jobs
Hire Freelancers

4 functions for the "ttrTests" package to work with the "Datasnoop" function

$10-30 USD

Closed
Posted about 4 years ago

$10-30 USD

Paid on delivery
***R Programming*** I need 4 simple strategi functions, which can be implemented in the "ttrTest package" in the R programming language. The functions must be capable of being implemented in the “datasnoop” function in the “ttrTests” package. See example1 below. Im trying to replicate the work of Halbert White(2000) by making the same strategies as him to calculate whites p-value. The strategies that White implement are the following: - Filter rule - Moving average rule - Support and resistance rule - Channel break out It is very simple strategies. I provide 3 examples of functions that works with the ttrTest package. This is provided as “example2, example3 and example 4”. I need the 4 strategies to be implemented with the dataSnoop function, the same way as shown in example1. I figure it should be relative easy, if you know how to code. 1.1 Filter Rules "A filter rule strategy is specified as follows. If the daily closing price (in U.S. dollars) of a foreign currency goes up by x% or more from its most recent low, then the speculator borrows the dollar and uses the proceeds to buy the foreign currency. When the closing price of the foreign currency drops by at least y% from a subsequent high, the speculator short sells the foreign currency and uses the proceeds to buy the dollar. We define the subsequent high as the highest price over the e most recent days and the subsequent low as the lowest price over the e most recent days. We also consider the case where a given long or short position is held for c days during which time all other signals are ignored." 1.2 Moving Average Rules "The moving average of a currency price for a given day is computed as the simple average of prices over the previous n days, including the current day. Under a moving average rule, when the short moving average of a foreign currency price is above the long moving average by an amount larger than the band with b%, the speculator buy. Similarly, when the short moving average is below the long moving average by b%, the speculator short sells. In addition to this fixed percentage band filter, we also implement the moving average rules with a time delay filter, which requires that the long or short signals remain valid for d days before he takes any action. As in the filter rule case, we also consider the case where a given long or short position is held for c days during which time all other signals are ignored." 1.3 Trading Range Break (or Support and Resistance) Rules "Under a trading range break rule, when the price of a foreign currency exceeds the maximum price (resistance level) over the previous n days by b%, the speculator borrows the dollar to buy the foreign currency. When the price goes below the minimum price over the previous n days by b%, the speculator sells short the FX to buy the dollar. We also consider an alternative definition for the resistance level, i.e., the local maximum (minimum), which is the most recent closing price higher (lower) than the e previous closing prices. As with the moving average rules, we implement the rules with a time delay filter, d, and as well we consider the case where a given long or short position is held for c days during which time all other signals are ignored." 1.4 Channel Breakout Rules A channel is defined to be one that occurs when the high price of a foreign currency over the previous n days is within x% of the low over the previous n days. Under a channel breakout rule, the speculator borrows the dollar to buy FX when the closing price of the foreign currency goes above the channel by b% and sells short the FX to buy the dollar when the closing price goes below the channel by b%. Once again, we consider holding a given long or short position for c days during which all other signals are ignored. Please look at the examples provided and ask for more details.
Project ID: 24138752

About the project

2 proposals
Remote project
Active 4 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
2 freelancers are bidding on average $80 USD for this job
User Avatar
I have 15 yrs experience in Microsoft applications: Pdf to word, Pdf to Excel, Excel, Word, Powerpoint and creatings, Entry, Copy-pasting, Typing and having 60 WPM Typing speed wants to reduce your work load and wants to give you the best results, Once you give me the chance for your project. I am diligent towards my work and capability to finish the work on time successfully. Thanks
$10 USD in 7 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of DENMARK
Viby j, Denmark
5.0
1
Payment method verified
Member since Feb 26, 2020

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.