function(price, detectionmatrix, t = 1, d = 3)
{
#compute NORMALIZED CONDITIONAL t DAYS RETURNS
	if(nrow(detectionmatrix) == 10) {
		n <- length(price)
		normret <- rep(0, n - t)
		for(i in 1:(n - t))
			normret[i] <- (price[i + t]/price[i])
		E <- mean(normret)
		S <- sqrt(var(normret))
		pocet <- counter(detectionmatrix)
		ctr <- 1	#
#HS
		returnHS <- rep(0, pocet[1])
		for(j in 1:(n - d - t)) {
			if(detectionmatrix[1, j] == 1) {
				returnHS[ctr] <- price[j + d + t]/price[j + d]
				ctr <- ctr + 1
			}
		}
		for(j in 1:(pocet[1]))
			returnHS[j] <- ((returnHS[j] - E)/S)
		ctr <- 1	#
#IHS
		returnIHS <- rep(0, pocet[2])
		for(j in 1:(n - d - t)) {
			if(detectionmatrix[2, j] == 1) {
				returnIHS[ctr] <- price[j + d + t]/price[j + d]
				ctr <- ctr + 1
			}
		}
		for(j in 1:(pocet[2]))
			returnIHS[j] <- ((returnIHS[j] - E)/S)
		ctr <- 1	#
#BT
		returnBT <- rep(0, pocet[3])
		for(j in 1:(n - d - t)) {
			if(detectionmatrix[3, j] == 1) {
				returnBT[ctr] <- price[j + d + t]/price[j + d]
				ctr <- ctr + 1
			}
		}
		for(j in 1:(pocet[3]))
			returnBT[j] <- ((returnBT[j] - E)/S)
		ctr <- 1	#
#BB
		returnBB <- rep(0, pocet[4])
		for(j in 1:(n - d - t)) {
			if(detectionmatrix[4, j] == 1) {
				returnBB[ctr] <- price[j + d + t]/price[j + d]
				ctr <- ctr + 1
			}
		}
		for(j in 1:(pocet[4]))
			returnBB[j] <- ((returnBB[j] - E)/S)
		ctr <- 1	#
#TT
		returnTT <- rep(0, pocet[5])
		for(j in 1:(n - d - t)) {
			if(detectionmatrix[5, j] == 1) {
				returnTT[ctr] <- price[j + d + t]/price[j + d]
				ctr <- ctr + 1
			}
		}
		for(j in 1:(pocet[5]))
			returnTT[j] <- ((returnTT[j] - E)/S)
		ctr <- 1	#
#TB
		returnTB <- rep(0, pocet[6])
		for(j in 1:(n - d - t)) {
			if(detectionmatrix[6, j] == 1) {
				returnTB[ctr] <- price[j + d + t]/price[j + d]
				ctr <- ctr + 1
			}
		}
		for(j in 1:(pocet[6]))
			returnTB[j] <- ((returnTB[j] - E)/S)
		ctr <- 1	#
#RT
		returnRT <- rep(0, pocet[7])
		for(j in 1:(n - d - t)) {
			if(detectionmatrix[7, j] == 1) {
				returnRT[ctr] <- price[j + d + t]/price[j + d]
				ctr <- ctr + 1
			}
		}
		for(j in 1:(pocet[7]))
			returnRT[j] <- ((returnRT[j] - E)/S)
		ctr <- 1	#
#RB
		returnRB <- rep(0, pocet[8])
		for(j in 1:(n - d - t)) {
			if(detectionmatrix[8, j] == 1) {
				returnRB[ctr] <- price[j + d + t]/price[j + d]
				ctr <- ctr + 1
			}
		}
		for(j in 1:(pocet[8]))
			returnRB[j] <- ((returnRB[j] - E)/S)
		ctr <- 1	#
#DT
		returnDT <- rep(0, pocet[9])
		for(j in 1:(n - d - t)) {
			if(detectionmatrix[9, j] == 1) {
				returnDT[ctr] <- price[j + d + t]/price[j + d]
				ctr <- ctr + 1
			}
		}
		for(j in 1:(pocet[9]))
			returnDT[j] <- ((returnDT[j] - E)/S)
		ctr <- 1	#
#DB
		returnDB <- rep(0, pocet[10])
		for(j in 1:(n - d - t)) {
			if(detectionmatrix[10, j] == 1) {
				returnDB[ctr] <- price[j + d + t]/price[j + d]
				ctr <- ctr + 1
			}
		}
		for(j in 1:(pocet[10]))
			returnDB[j] <- ((returnDB[j] - E)/S)
		return(returnHS, returnIHS, returnBT, returnBB, returnTT, returnTB, returnRT, returnRB, returnDT,
			returnDB)
	}
	else print("Invalid detection matrix.")
}
