Suppose it is a multi-period binomial tree, each period it can only go UP(Head) or DOWN(Tail). for a 3 period tree, there will be 2^3=8 scenarios/paths. For example, one of the path is all Heads, that is HHH, then there is HHT, HTH, HTT...
When the period gets large, it is easier to have a loop. Using R, how could I generate a large amount of binomial paths, then I can loop over these paths for other purposes.