How to change data frame by getting some specific rows repeated? [duplicate] - r

This question already has an answer here:
How to repeat rows with 0 price from dataframe before non zero price row?
(1 answer)
Closed 6 years ago.
a b c d
5015 3.49 1059.500 0.00
5023 2.50 6056.000 2.50
5024 3.00 1954.500 3.00
5026 3.49 1163.833 0.00
5037 2.50 6797.000 2.50
5038 3.00 2109.000 3.00
5040 2.50 4521.000 2.50
5041 3.33 2469.000 3.33
I want to repeat previously observed row with column 0 before a row non zero value of d. so, I will get rows with alternate rows of row with zero value of d then non zero value of d. a row with zero value of d must be previously observed row.
Output I want is:
a b c d
5015 3.49 1059.500 0.00
5023 2.50 6056.000 2.50
5015 3.49 1059.500 0.00
5024 3.00 1954.500 3.00
5026 3.49 1163.833 0.00
5037 2.50 6797.000 2.50
5026 3.49 1163.833 0.00
5038 3.00 2109.000 3.00
5026 3.49 1163.833 0.00
5040 2.50 4521.000 2.50
5026 3.49 1163.833 0.00
5041 3.33 2469.000 3.33

We can create a custom function f that will interleave the first row. Split on cumsum(d == 0) creating an index for values equaling 0. Finally we combine with do.call(rbind, ...). I added an optional 'row.names<-'(..., NULL) call to undo the default naming convention:
f <- function(x) x[c(rbind(rep(1,nrow(x)-1), 2:nrow(x))),]
`row.names<-`(do.call(rbind, lapply(split(df1, cumsum(df1$d == 0)), f)), NULL)
# a b c d
# 1 5015 3.49 1059.500 0.00
# 2 5023 2.50 6056.000 2.50
# 3 5015 3.49 1059.500 0.00
# 4 5024 3.00 1954.500 3.00
# 5 5026 3.49 1163.833 0.00
# 6 5037 2.50 6797.000 2.50
# 7 5026 3.49 1163.833 0.00
# 8 5038 3.00 2109.000 3.00
# 9 5026 3.49 1163.833 0.00
# 10 5040 2.50 4521.000 2.50
# 11 5026 3.49 1163.833 0.00
# 12 5041 3.33 2469.000 3.33
There is an interleave trick in there. Try c(rbind(c(1,1,1), c(2,3,4))) to see the way the numbers will be weaved together

Package data.table's grouping by is useful here:
library(data.table)
DF <-fread(" a b c d
5015 3.49 1059.500 0.00
5023 2.50 6056.000 2.50
5024 3.00 1954.500 3.00
5026 3.49 1163.833 0.00
5037 2.50 6797.000 2.50
5038 3.00 2109.000 3.00
5040 2.50 4521.000 2.50
5041 3.33 2469.000 3.33")
DF[ #find indices:
DF[, {ind <- .I[rep(1L, (.N - 1) * 2)] #first repeat the first index
ind[c(FALSE, TRUE)] <- .I[-1] #then replace every second repeat with the other indices
ind
}, by = cumsum(abs(d) < .Machine$double.eps^0.5)][["V1"]] #group by the different d = 0 rows,
#beware of floating point errors if you have calculated d
] #subset with the indices
# a b c d
# 1: 5015 3.49 1059.500 0.00
# 2: 5023 2.50 6056.000 2.50
# 3: 5015 3.49 1059.500 0.00
# 4: 5024 3.00 1954.500 3.00
# 5: 5026 3.49 1163.833 0.00
# 6: 5037 2.50 6797.000 2.50
# 7: 5026 3.49 1163.833 0.00
# 8: 5038 3.00 2109.000 3.00
# 9: 5026 3.49 1163.833 0.00
# 10: 5040 2.50 4521.000 2.50
# 11: 5026 3.49 1163.833 0.00
# 12: 5041 3.33 2469.000 3.33

Related

How to read multiple data with changing NA patterns?

I try to read in some measurement data with the following code
UGT2008 <- rbind.fill(lapply(filelist[1:70], fread, header = F, dec = ".", sep = "\t", na.strings = c("NA","%-","%"), skip = 1L,stringsAsFactors=FALSE))
I use this code, becasue I have multiple data, I want to bind together to one big dataset.
The problem is, wrong values, which should be treated as NA, are marked by "%" at the beginning of the value. So, NA is not one single characters, but a sample of different numbers starting with "%".
The number of different wrong values is to large to name all of the them as "na.strings".
After reading the data, all columns are character, but should be numeric.
The data look like this.
Datum Zeit Temp1/grad Temp2/grad Pyrr+/W/qm Pyrr-/W/qm Global/W/qm H-Flux/W/qm Windr./grad Pegel/cmWS Phar/µmol Bspg./V Widerst./kOhm Blattb./j/n
18.12.00 09:55 2.64 -98.14 -42.34 47.23 68.14 7.44 341.08 0.15 151.76 11.08 %-2546.78 1.00
18.12.00 09:56 2.63 -98.13 -19.07 47.04 65.36 7.31 346.73 0.02 151.28 11.06 %-2546.78 1.00
18.12.00 09:57 2.62 -98.14 -43.73 44.92 64.32 7.36 353.86 -0.01 147.53 11.07 %-2546.78 1.00
18.12.00 09:58 2.75 -98.18 -43.83 44.21 63.42 7.40 360.33 0.12 143.96 11.10 %-2546.78 1.00
18.12.00 09:59 2.65 -98.12 -43.53 43.60 63.42 7.40 356.76 0.12 144.44 11.08 %-2546.78 1.00
18.12.00 10:00 2.74 -98.18 -43.70 43.67 63.42 7.40 359.96 0.13 144.73 11.10 %-2546.78 1.00
18.12.00 10:01 2.62 -98.14 -44.24 42.90 61.00 7.57 3.66 0.14 139.34 11.16 %-2546.78 1.00
18.12.00 10:02 2.62 -98.12 -44.34 40.52 58.08 7.06 356.71 0.00 136.45 11.08 %-2546.78 1.00
18.12.00 10:03 2.74 -98.18 -46.03 41.04 59.19 7.53 360.35 0.14 135.87 11.12 %-2546.78 1.00
18.12.00 10:04 2.63 -98.12 -44.64 42.35 60.86 7.31 347.55 0.13 140.11 11.12 %-2546.78 1.00
18.12.00 10:05 2.62 -98.13 -20.39 43.54 60.37 7.14 361.00 -0.02 144.35 11.09 %-2546.78 1.00
18.12.00 10:06 2.72 -98.18 -45.32 41.20 58.92 7.36 353.24 0.13 135.77 11.13 %-2546.78 1.00
18.12.00 10:07 2.73 -98.18 -45.56 40.91 57.88 7.36 356.10 0.10 134.04 11.13 %-2546.78 1.00
18.12.00 10:08 2.62 -98.12 -43.05 41.94 58.85 7.01 6.54 0.01 140.11 11.14 %-2546.78 1.00
18.12.00 10:09 2.63 -98.14 -43.90 43.06 60.72 7.23 338.23 -0.01 144.25 11.10 %-2546.78 1.00
18.12.00 10:10 2.62 -98.13 -43.86 43.48 61.27 7.23 356.67 -0.01 145.12 11.10 %-2546.78 1.00
18.12.00 10:11 2.63 -98.13 -44.13 42.74 59.26 7.19 360.77 -0.01 141.07 11.11 %-2546.78 1.00
18.12.00 10:12 2.62 -98.12 -45.18 41.39 58.43 7.36 360.31 0.13 136.06 11.15 %-2546.78 1.00
18.12.00 10:13 2.61 -98.18 -31.82 40.72 58.08 7.36 0.85 0.00 140.20 11.14 %-2546.78 1.00
18.12.00 10:14 2.63 -98.13 -44.88 41.42 59.12 7.53 6.60 0.09 139.53 11.20 %-2546.78 1.00
18.12.00 10:15 2.62 -98.11 -43.29 41.71 59.82 7.10 10.82 0.00 143.77 11.16 %-2546.78 1.00
18.12.00 10:16 2.62 -98.12 -43.05 43.99 64.32 7.31 7.32 0.12 151.09 11.20 %-2546.78 1.00
18.12.00 10:17 2.74 -98.18 -40.82 48.32 71.39 7.36 156.24 0.11 166.50 11.19 %-2546.78 1.00
18.12.00 10:18 2.61 -98.18 -38.28 52.98 74.17 7.06 188.01 0.01 178.16 11.16 %-2546.78 1.00
18.12.00 10:19 2.62 -98.13 -37.61 53.94 76.94 7.44 142.70 0.12 179.41 11.22 %-2546.78 1.00
18.12.00 10:20 2.63 -98.12 -37.40 53.49 76.04 7.40 305.02 0.11 179.51 11.21 %-2546.78 1.00
18.12.00 10:21 2.63 -98.14 -38.52 52.27 73.89 7.31 312.70 -0.01 179.61 11.20 %-2546.78 1.00
18.12.00 10:22 2.63 -98.13 -14.97 52.82 71.60 7.06 280.18 -0.01 176.72 11.20 %-2546.78 1.00
I tried
na.strings = c("NA",grepl("^","%"))
but that`s not working.
na.strings = c("NA",patter=("%*"))
is also not working.
Do you have any idea, how to set changing patterns of na.strings or to identify "%" as the start of an NA-Value?
Cheers,
Florian
Data:
df <- data.frame(
v1 = c("%123", "123", "5.5"),
v2 = c("45.00006", "%-12.8899", "%900.77"),
v3 = c("55", "66", "%432.002")
)
Solution:
Use as.numeric and lapply to accomplish both goals, that of turning the %-headed values into NA and that of converting the columns in the dataframe to numeric type:
df[] <- lapply(df, as.numeric)
v1 v2 v3
[1,] NA 45.00006 55
[2,] 123.0 NA 66
[3,] 5.5 NA NA

R Rstudio Error in `colnames<-`(`*tmp*`, value = names(getMu(Data))) : attempt to set 'colnames' on an object with less than two dimensions

I am a student and new in R.
I found many post about it, but didn't understand what to do with my data.
I try to make a Box-Constrained Portfolio Frontier but get this error (it's incredible, but earlier I used to do this task on other assets, there was no such error)
Code and error
> tail(ALIGNED)
GMT
ASBN FBPRP FBTT FCPB FCRGF FLWS FPAFF FQVLF MSFT PGQWF OPMZ VALE PIH USEL TURN
2018-02-16 20.55 22 32.9 7.95 16.62 11.00 0.70 16.50 92.00 0.08 2e-04 14.12 7.10 0.1901 1.78
2018-02-19 20.55 22 32.9 7.95 16.62 11.00 0.70 16.50 92.00 0.08 2e-04 14.12 7.10 0.1901 1.78
2018-02-20 20.14 22 32.9 7.95 16.62 11.35 0.67 16.31 92.72 0.08 1e-04 13.98 6.95 0.3020 1.87
2018-02-21 20.14 22 32.9 8.50 16.62 11.50 0.67 16.45 91.49 0.08 1e-04 13.66 6.90 0.3020 1.88
2018-02-22 20.14 22 32.9 8.50 16.62 11.95 0.67 16.36 91.73 0.08 1e-04 13.98 6.70 0.3020 1.90
2018-02-23 20.11 22 32.9 9.00 16.62 12.50 0.64 16.66 94.06 0.08 1e-04 14.20 6.65 0.3020 1.92
> class(ALIGNED)
[1] "timeSeries"
attr(,"package")
[1] "timeSeries"
boxSpec <- portfolioSpec()
setNFrontierPoints(boxSpec) <- 15
boxConstraints <- c("minW[1:15]=0.3", "maxW[1:15]=0.12")
boxFrontier <- portfolioFrontier(data = ALIGNED, spec = boxSpec, constraints = boxConstraints)
#Error in `colnames<-`(`*tmp*`, value = names(getMu(Data))) :
# attempt to set 'colnames' on an object with less than two dimensions
manual
error log
Selfcleared, the problem was in the frontierpoints, just enter some random quantity of setNFrontierPoints, and you will clearyfy this

Combine two consecutive rows in a dataframe

I have a dataframe price.hierarchy
read.table(header=TRUE, text=
" WEEK PRICE QUANTITY SALE_PRICE TYPE
1 4992 3.49 11541.600 3.49 1
2 5001 3.00 38944.000 3.00 1
3 5002 3.49 10652.667 3.49 1
4 5008 3.00 21445.000 3.00 1
5 5009 3.49 10039.667 3.49 1
6 5014 3.33 22624.000 3.33 1
7 5015 3.49 9146.500 3.49 1
8 5027 3.33 14751.000 3.33 1
9 5028 3.49 9146.667 3.49 1
10 5034 3.33 18304.000 3.33 1
11 5035 3.49 10953.500 3.49 1")
I want output like
read.table(header=F, text=
"1 4992 3.49 11541.600 3.49 1 5001 3.00 38944.000 3.00 1
2 5001 3.00 38944.000 3.00 1 5002 3.49 10652.667 3.49 1
3 5002 3.49 10652.667 3.49 1 5008 3.00 21445.000 3.00 1
4 5008 3.00 21445.000 3.00 1 5009 3.49 10039.667 3.49 1
5 5009 3.49 10039.667 3.49 1 5014 3.33 22624.000 3.33 1
6 5014 3.33 22624.000 3.33 1 5015 3.49 9146.500 3.49 1
7 5015 3.49 9146.500 3.49 1 5027 3.33 14751.000 3.33 1
8 5027 3.33 14751.000 3.33 1 5028 3.49 9146.667 3.49 1
9 5028 3.49 9146.667 3.49 1 5034 3.33 18304.000 3.33 1
10 5034 3.33 18304.000 3.33 1 5035 3.49 10953.500 3.49 1")
I am trying to combine first and second row, second and third row etc at the end from the same data frame.
I tried
price.hierarchy1 <- price.hierarchy[c(1: (nrow(price.hierarchy)-1)), ]
price.hierarchy2 <- price.hierarchy[c(2: nrow(price.hierarchy)), ]
price.hierarchy3 <- cbind(price.hierarchy1, price.hierarchy2)
price.hierarchy3 <- unique(price.hierarchy3)
Another variant is
cbind(df1[-nrow(df1),], df1[-1,])
First dispart the rows, then cbind()
cbind(df[1:(nrow(df)-1),], df[2:nrow(df),])
or
cbind(head(df,-1), tail(df,-1))

How to repeat rows with 0 price from dataframe before non zero price row?

I have a data
WEEK PRICE QUANTITY SALE_PRICE
4992 3.49 1908.750 0.00
4999 2.50 5681.000 2.50
5001 3.00 3187.000 3.00
5002 3.49 1455.000 0.00
5008 2.69 2263.500 2.69
5011 3.49 1515.500 0.00
5013 2.69 3297.000 2.69
5015 3.49 1059.500 0.00
5023 2.50 6056.000 2.50
5024 3.00 1954.500 3.00
5026 3.49 1163.833 0.00
5037 2.50 6797.000 2.50
5038 3.00 2109.000 3.00
5040 2.50 4521.000 2.50
5041 3.33 2469.000 3.33
I want to repeat the last observed row with sale price 0, immediately before a non zero sale price only at the places where there is no row with sale price 0 before a row having a sale price. The output should look like this:
WEEK PRICE QUANTITY SALE_PRICE TYPE
4992 3.49 1908.750 0.00 3
4999 2.50 5681.000 2.50 3
4992 3.49 1908.750 0.00 3
5001 3.00 3187.000 3.00 3
5002 3.49 1455.000 0.00 3
5008 2.69 2263.500 2.69 3
5011 3.49 1515.500 0.00 3
5013 2.69 3297.000 2.69 3
5015 3.49 1059.500 0.00 3
5023 2.50 6056.000 2.50 3
5015 3.49 1059.500 0.00 3
5024 3.00 1954.500 3.00 3
5026 3.49 1163.833 0.00 3
5037 2.50 6797.000 2.50 3
5026 3.49 1163.833 0.00 3
5038 3.00 2109.000 3.00 3
5026 3.49 1163.833 0.00 3
5040 2.50 4521.000 2.50 3
5026 3.49 1163.833 0.00 3
5041 3.33 2469.000 3.33 3
Data
structure(list(WEEK = c(4992L, 4999L, 5001L, 5002L, 5008L, 5011L,
5013L, 5015L, 5023L, 5024L, 5026L, 5037L, 5038L, 5040L, 5041L
), PRICE = c(3.49, 2.5, 3, 3.49, 2.69, 3.49, 2.69, 3.49, 2.5,
3, 3.49, 2.5, 3, 2.5, 3.33), QUANTITY = c(1908.75, 5681, 3187,
1455, 2263.5, 1515.5, 3297, 1059.5, 6056, 1954.5, 1163.833, 6797,
2109, 4521, 2469), SALE_PRICE = c(0, 2.5, 3, 0, 2.69, 0, 2.69,
0, 2.5, 3, 0, 2.5, 3, 2.5, 3.33)), .Names = c("WEEK", "PRICE",
"QUANTITY", "SALE_PRICE"), class = "data.frame", row.names = c(NA,
-15L))
I have tried
if(nrow(price.hierarchy) > 2) {
for(i in 2: (nrow(price.hierarchy) - 1)) {
if(price.hierarchy$SALE_PRICE[i] !=0 & price.hierarchy$SALE_PRICE[i+1] !=0 & price.hierarchy$SALE_PRICE[i-1]==0) {
price.hierarchy1 <- price.hierarchy[which(price.hierarchy[, 1] > price.hierarchy[i,1]), ]
price.hierarchy[i+1, ] <- NA
price.hierarchy[i+1, ] <- price.hierarchy[i-1, ]
price.hierarchy2 <- price.hierarchy[which(price.hierarchy[, 1] < price.hierarchy[i+2,1]), ]
price.hierarchy <- rbind(price.hierarchy2, price.hierarchy1)
}
else
price.hierarchy
}
}
Which gives:
> price.hierarchy
WEEK PRICE QUANTITY SALE_PRICE
1 4992 3.49 1908.750 0.00
2 4999 2.50 5681.000 2.50
3 4992 3.49 1908.750 0.00
31 5001 3.00 3187.000 3.00
4 5002 3.49 1455.000 0.00
5 5008 2.69 2263.500 2.69
6 5011 3.49 1515.500 0.00
7 5013 2.69 3297.000 2.69
8 5015 3.49 1059.500 0.00
9 5023 2.50 6056.000 2.50
10 5015 3.49 1059.500 0.00
101 5024 3.00 1954.500 3.00
11 5026 3.49 1163.833 0.00
12 5037 2.50 6797.000 2.50
13 5026 3.49 1163.833 0.00
131 5038 3.00 2109.000 3.00
14 5040 2.50 4521.000 2.50
15 5041 3.33 2469.000 3.33
The shift function from data.table could be useful here.
I want to repeat last observed row with sale price 0, immediate before
non zero sale price only at the places where there is no row with sale
price 0 before a row having sale price
I'm not sure about the latter requirements without more explanation. Here's a quick solution that gives the observations an identifier i for sorting purposes, and then duplicates and appends those that precede a zero sale price. Finally, sort on identifiers adjusted to place duplicated rows two rows after the originals.
library(data.table)
setDT(d)
d[, i := seq_len(.N)]
d[, led_zero := shift(SALE_PRICE, type = "lead") == 0]
d_duped = d[(led_zero)][, i := i + 1.5]
d_out = rbind(d, d_duped)
d_out[order(i)]
# WEEK PRICE QUANTITY SALE_PRICE i led_zero
# 1: 4992 3.49 1908.750 0.00 1.0 FALSE
# 2: 4999 2.50 5681.000 2.50 2.0 FALSE
# 3: 5001 3.00 3187.000 3.00 3.0 TRUE
# 4: 5002 3.49 1455.000 0.00 4.0 FALSE
# 5: 5001 3.00 3187.000 3.00 4.5 TRUE
# 6: 5008 2.69 2263.500 2.69 5.0 TRUE
# 7: 5011 3.49 1515.500 0.00 6.0 FALSE
# 8: 5008 2.69 2263.500 2.69 6.5 TRUE
# 9: 5013 2.69 3297.000 2.69 7.0 TRUE
# 10: 5015 3.49 1059.500 0.00 8.0 FALSE
# 11: 5013 2.69 3297.000 2.69 8.5 TRUE
# 12: 5023 2.50 6056.000 2.50 9.0 FALSE
# 13: 5024 3.00 1954.500 3.00 10.0 TRUE
# 14: 5026 3.49 1163.833 0.00 11.0 FALSE
# 15: 5024 3.00 1954.500 3.00 11.5 TRUE
# 16: 5037 2.50 6797.000 2.50 12.0 FALSE
# 17: 5038 3.00 2109.000 3.00 13.0 FALSE
# 18: 5040 2.50 4521.000 2.50 14.0 FALSE
# 19: 5041 3.33 2469.000 3.33 15.0 NA

How can I force View in R to not use scientific notation and limit the digits?

I am using View in R to display a data group. I use the following statements to create a View display:
options(scipen = 600)
View(format.data.frame(port.frame, digits = 3, nsmall = 2,
justify = "centre"))
Names Close AnnReturn SD EqWgt MeanVar MomWgt NaivPar
1 LMOIX 30.50 14.57 16.59 0.250 -0.00000000000000000643 0.480 0.221
2 TREPX 11.55 9.58 15.65 0.250 0.28611506417112164691 0.240 0.235
3 TRPGX 12.64 15.95 13.14 0.250 0.71388493582887835309 0.160 0.280
4 SMVTX 14.00 15.74 13.91 0.250 0.00000000000000000347 0.120 0.264
5 Sum weights 0.00 0.00 0.00 1.000 1.00000000000000000000 1.000 1.000
6 Port. Ret. 0.00 0.00 0.00 13.960 14.12857148500626180976 13.732 14.094
7 Port. Vol. 0.00 0.00 0.00 13.803 13.23194704976875080149 14.431 13.720
8 Sharpe Rat. 0.00 0.00 0.00 0.729 0.79632953321575861150 0.679 0.745
9 Sortino Rat. 0.00 0.00 0.00 1.134 1.20134743486126471801 1.067 1.153
10 Info. Rat. 0.00 0.00 0.00 0.683 0.69660638606011093810 0.664 0.690
11 Beta 0.00 0.00 0.00 0.260 0.24611926403332246016 0.264 0.258
As can be seen, the 6th column ignores my request for 3 digits, and if I don’t use the “scipen” expression, it uses the scientific notation for that column. I want 3 digits, 2 past the decimal, on each column. Why does it ignore my decimal request in column 6?
You can use lucid package. From the package vignette:
The package provides a method for pretty-printing vectors of floating point numbers,...
library(lucid)
Example using built in datset mtcars
lucid(mtcars[15:20,])
mpg cyl disp hp drat wt qsec vs am gear carb
Cadillac Fleetwood 10.4 8 472 205 2.93 5.25 18 0 0 3 4
Lincoln Continental 10.4 8 460 215 3 5.42 17.8 0 0 3 4
Chrysler Imperial 14.7 8 440 230 3.23 5.34 17.4 0 0 3 4
Fiat 128 32.4 4 78.7 66 4.08 2.2 19.5 1 1 4 1
Honda Civic 30.4 4 75.7 52 4.93 1.62 18.5 1 1 4 2
Toyota Corolla 33.9 4 71.1 65 4.22 1.84 19.9 1 1 4 1
it also works with View() command.
You could use round to really force the issue (in a temporary dataframe if need be):
dat[,2:8] <- lapply(dat[,2:8], round, 2)
format(dat, justify = "centre") # or View(format(dat, justify = "centre"))
Results
Names Close AnnReturn SD EqWgt MeanVar MomWgt NaivPar
1 LMOIX 30.50 14.57 16.59 0.25 0.00 0.48 0.22
2 TREPX 11.55 9.58 15.65 0.25 0.29 0.24 0.24
3 TRPGX 12.64 15.95 13.14 0.25 0.71 0.16 0.28
4 SMVTX 14.00 15.74 13.91 0.25 0.00 0.12 0.26
5 Sum weights 0.00 0.00 0.00 1.00 1.00 1.00 1.00
6 Port. Ret. 0.00 0.00 0.00 13.96 14.13 13.73 14.09
7 Port. Vol. 0.00 0.00 0.00 13.80 13.23 14.43 13.72
8 Sharpe Rat. 0.00 0.00 0.00 0.73 0.80 0.68 0.74
9 Sortino Rat. 0.00 0.00 0.00 1.13 1.20 1.07 1.15
10 Info. Rat. 0.00 0.00 0.00 0.68 0.70 0.66 0.69
11 Beta 0.00 0.00 0.00 0.26 0.25 0.26 0.26
Data
dat <- read.csv(text="Names,Close,AnnReturn,SD,EqWgt,MeanVar,MomWgt,NaivPar
LMOIX,30.50,14.57,16.59,0.250,-0.00000000000000000643,0.480,0.221
TREPX,11.55,9.58,15.65,0.250,0.28611506417112164691,0.240,0.235
TRPGX,12.64,15.95,13.14,0.250,0.71388493582887835309,0.160,0.280
SMVTX,14.00,15.74,13.91,0.250,0.00000000000000000347,0.120,0.264
Sum weights,0.00,0.00,0.00,1.000,1.00000000000000000000,1.000,1.000
Port. Ret.,0.00,0.00,0.00,13.960,14.12857148500626180976,13.732,14.094
Port. Vol.,0.00,0.00,0.00,13.803,13.23194704976875080149,14.431,13.720
Sharpe Rat.,0.00,0.00,0.00,0.729,0.79632953321575861150,0.679,0.745
Sortino Rat.,0.00,0.00,0.00,1.134,1.20134743486126471801,1.067,1.153
Info. Rat.,0.00,0.00,0.00,0.683,0.69660638606011093810,0.664,0.690
Beta,0.00,0.00,0.00,0.260,0.24611926403332246016,0.264,0.258")

Resources