It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
Signal # Trades % Win Mean Win Mean Loss Median Win Median Loss Mean W/L Median W/L
1 -1 132 56.81818 6.341372 -5.713935 2.840616 -4.183966 1.109808 0.678929
2 0 21 0.00000 NaN NaN NA NA NaN NA
3 1 52 57.69231 5.068756 -3.911978 3.199519 -1.747152 1.295702 1.831277
Signal # Trades % Win Mean Win Mean Loss Median Win Median Loss Mean W/L Median W/L
1 -1 93 52.68817 7.132123 -6.507944 3.636423 -4.839239 1.095910 0.7514452
2 0 1 0.00000 NaN NaN NA NA NaN NA
3 1 90 46.66667 4.551028 -4.431499 2.366660 -2.242254 1.026973 1.0554826
# install.packages(c("quantmod","TTR"))
library(quantmod)
library(TTR)
# Load presorted data
x = last(y,205) #gets the last 205 daily positions from the data
# Calculate the EMA indicators
ema10 <- EMA(Cl(x),10)
ema21 <- EMA(Cl(x),21)
# Create the long (up) and short (dn) signals
sigbuy <- ifelse(ema10 > ema21, 1, 0)
sigsell <- ifelse(ema10 < ema21, -1, 0)
# Lag signals to align with days in market,
# not days signals were generated
sigbuy <- lag(sigbuy,1) # Note k=1 implies a move *forward*
sigsell <- lag(sigsell,1) # Note k=1 implies a move *forward*
# Replace missing signals with no position
# (generally just at beginning of series)
sigbuy[is.na(sigbuy)] <- 0
sigsell[is.na(sigsell)] <- 0
# Combine both signals into one vector
sig <- sigbuy + sigsell
# Calculate Close-to-Close returns
ret <- ROC(Cl(x))
ret[1] <- 0
# Calculate equity curves
eq_up <- exp(cumsum(ret*sigbuy))
eq_dn <- exp(cumsum(ret*sigsell*-1))
eq_all <- exp(cumsum(ret*sig))
# Equity Chart
png("EMAcross.png",width=720,height=720)
plot.zoo( cbind(eq_up, eq_dn),
ylab=c("Long","Short"), col=c("green","red"),
main="EMA5-EMA21 Crossover Strategy: 07-23-2011 to 01-22-2012" )
dev.off()
png(filename="emacross.png",width=720,height=720)
plot.zoo( cbind(eq_up, eq_dn), plot.type="single", ylab=c("Long","Short"), col=c("green","red"), main="EMA Crossover Strategy:\n 2011-07-23 through 2012-01-22" )
dev.off()
# Create a chart showing mtgoxUSD
png("EMAcrosschart.png",width=720,height=720)
chartSeries(x, subset="last 184 days", type="line")
# Add the total equity line
addTA(eq_all)
dev.off()
# Evaluate the Strategy
# install.packages("PerformanceAnalytics")
require(PerformanceAnalytics)
# chart equity curve, daily performance, and drawdowns
png("performance-EMAcross.png",height=720,width=720)
charts.PerformanceSummary(ret)
dev.off()
# Load data
# install.packages(c("quantmod","TTR"))
library(quantmod)
library(TTR)
x = last(y,184) #gets the last 184 daily positions from the data (starts at July 23, 2011)
# Calculate the random indicator
set.seed(43) #include this to reproduce my results
x$flip <- rbinom(length(x$.Open),1,0.5) #50% probability that 1 (heads/buy) will show and 50% probability that 0 (tails/sell) will show
# Create the buy (1) and sell (-1) signals
sigbuy <- ifelse(x$flip == 1, 1, 0)
sigsell <- ifelse(x$flip == 0, -1, 0)
# Lag signals to align with days in market,
# not days signals were generated
sigbuy <- lag(sigbuy,1) # Note k=1 implies a move *forward*
sigsell <- lag(sigsell,1) # Note k=1 implies a move *forward*
# Replace missing signals with no position
# (generally just at beginning of series)
sigbuy[is.na(sigbuy)] <- 0
sigsell[is.na(sigsell)] <- 0
# Combine both signals into one vector
sig <- sigbuy + sigsell
# Calculate Close-to-Close returns
ret <- ROC(Cl(x))
ret[1] <- 0
# Calculate equity curves
eq_up <- exp(cumsum(ret*sigbuy))
eq_dn <- exp(cumsum(ret*sigsell*-1))
eq_all <- exp(cumsum(ret*sig))
# Equity Chart
png(filename="flipist.png",width=720,height=720)
plot.zoo( cbind(eq_up, eq_dn), plot.type="single", ylab=c("Long","Short"), col=c("green","red"), main="Flipist Strategy:\n 2011-07-23 through 2012-01-22" )
dev.off()
# Create a chart showing mtgoxUSD
png("flipistchart.png",width=720,height=720)
chartSeries(x, subset="last 184 days", type="line")
# Add the total equity line
addTA(eq_all)
dev.off()
# Evaluate the Strategy
# install.packages("PerformanceAnalytics")
require(PerformanceAnalytics)
# chart equity curve, daily performance, and drawdowns
png("performance-flipist.png",height=720,width=720)
charts.PerformanceSummary(ret)
dev.off()
#install.packages("xts") #install the xts package if you don't already have it. Available on CRAN
require(xts)
ohlc <- function(ttime,tprice,tvolume,fmt)
{
ttime.int <- format(ttime,fmt)
data.frame(time = ttime[tapply(1:length(ttime),ttime.int,function(x) {head(x,1)})],
.Open = tapply(tprice,ttime.int,function(x) {head(x,1)}),
.High = tapply(tprice,ttime.int,max),
.Low = tapply(tprice,ttime.int,min),
.Close = tapply(tprice,ttime.int,function(x) {tail(x,1)}),
.Volume = tapply(tvolume,ttime.int,function(x) {sum(x)}),
.Adjusted = tapply(tprice,ttime.int,function(x) {tail(x,1)}))
}
data <- ohlc(data$time,data$price, data$volume,"%Y%m%d%H") #converts data in CSV to OHLC
data <- xts(data[,-1], order.by=data[,1]) #converts data frame to an XTS object