[Question]
  [
**Story**  
Long time ago Bobby created a Bitcoin wallet with 1 Satoshi (1e-8 BTC, smallest currency unit) and forgot about it. Like many others he later though "Damn, if only I invested more back then...".  
Not stopping at daydreaming, he dedicates all of his time and money to building a time machine. He spends most of his time in his garage, unaware of worldly affairs and rumors circulating about him. He completes the prototype a day before his electricity is about to be turned off due to missed payments. Looking up from his workbench he sees a police van pulling up to his house, looks like the nosy neighbours thought he is running a meth lab in his garage and called the cops.  
With no time to run tests he grabs a USB-stick with the exchange rate data of the past years, connects the Flux Capacitor to the Quantum Discombobulator and finds himself transported back to the day when he created his wallet
**Task**  
Given the exchange rate data, find out how much money Bobby can make. He follows a very simple rule: "Buy low - sell high" and since he starts out with an infinitesimally small capital, we assume that his actions will have no impact on the exchange rates from the future.
**Input**  
A list of floats > 0, either as a string separated by a single character (newline, tab, space, semicolon, whatever you prefer) passed as command line argument to the program, read from a textfile or STDIN or passed as a parameter to a function. You can use numerical datatypes or arrays instead of a string because its basically just a string with brackets.
**Output**  
The factor by which Bobbys capital multiplied by the end of trading.
**Example**
```
Input:  0.48 0.4 0.24 0.39 0.74 1.31 1.71 2.1 2.24 2.07 2.41
```
Exchange rate: 0.48 $/BTC, since it is about to drop we sell all Bitcoins for 4.8 nanodollar. Factor = 1
Exchange rate: 0.4, do nothing  
Exchange rate: 0.24 $/BTC and rising: convert all $ to 2 Satoshis. Factor = 1 (the dollar value is still unchanged)  
Exchange rate: 0.39 - 2.1 $/BTC: do nothing  
Exchange rate: 2.24 $/BTC: sell everything before the drop. 44.8 nanodollar, factor = 9.33  
Exchange rate: 2.07 $/BTC: buy 2.164 Satoshis, factor = 9.33  
Exchange rate: 2.41 $/BTC: buy 52.15 nanodollar, factor = **10.86** 
```
Output: 10.86
```
**Additional Details**  
You may ignore weird edge cases such as constant input, zero- or negative values, only one input number, etc.  
Feel free to generate your own random numbers for testing or using actual stock charts. [Here](http://pastebin.com/8VYsEm4W) is a longer input for testing (Expected output approx. 321903884.638)  
Briefly explain what your code does  
Graphs are appreciated but not necessary
  
[Answer]
# APL, 16 chars
```
{×/1⌈÷/⊃⍵,¨¯1⌽⍵}
```
This version uses **@Frxstrem**'s simpler algorithm and **@xnor**'s `max(r,1)` idea.
It also assumes that the series is overall rising, that is, the first bitcoin value is smaller than the last one. This is consistent with the problem description. To get a more general formula, the first couple of rates must be dropped, adding 2 chars: `{×/1⌈÷/⊃1↓⍵,¨¯1⌽⍵}`
**Example:**
```
    {×/1⌈÷/⊃⍵,¨¯1⌽⍵}  0.48 0.4 0.24 0.39 0.74 1.31 1.71 2.1 2.24 2.07 2.41
10.86634461
    {×/1⌈÷/⊃⍵,¨¯1⌽⍵}  (the 1000 array from pastebin)
321903884.6
```
**Explanation:**
Start with the exchange rate data:
```
    A←0.48 0.4 0.24 0.39 0.74 1.31 1.71 2.1 2.24 2.07 2.41
```
Pair each number with the preceding one (the first will be paired with the last) and put them into a matrix:
```
    ⎕←M←⊃A,¨¯1⌽A
0.48 2.41
0.4  0.48
0.24 0.4
0.39 0.24
0.74 0.39
1.31 0.74
1.71 1.31
2.1  1.71
2.24 2.1
2.07 2.24
2.41 2.07
```
Reduce each row by division, keep those with ratio > 1, and combine the ratios by multiplication. This will eliminate any repeating factors in a row of successive rising rates, as well as the spurious ratio between the first and last exchange rates:
```
    ×/1⌈÷/M
10.86634461
```
[Answer]
## Python, 47
```
f=lambda t:2>len(t)or max(t[1]/t[0],1)*f(t[1:])
```
[Example run on the test case](http://ideone.com/lBV09P).
Take a list of floats. Recursively multiplies on the profit factor from the first two elements until fewer than two elements remains. For the base case, gives `True` which equals `1`.
Using `pop` gives the same number of chars.
```
f=lambda t:2>len(t)or max(t[1]/t.pop(0),1)*f(t)
```
So does going from the end of the list.
```
f=lambda t:2>len(t)or max(t.pop()/t[-1],1)*f(t)
```
For comparison, my iterative code in Python 2 is 49 chars, 2 chars longer
```
p=c=-1
for x in input():p*=max(x/c,1);c=x
print-p
```
Starting with `c=-1` is a hack to make the imaginary first "move" never show a profit. Starting the product at `-1` rather than `1` lets us assign both elements together, and we negative it back for free before printing.
[Answer]
# Python, ~~79~~ ~~81~~ ~~76~~ 77 bytes
```
f=lambda x:reduce(float.__mul__,(a/b for a,b in zip(x[1:],x[:-1]) if a>b),1.)
```
`x` is the input encoded as a list. The function returns the factor.
[Answer]
# CJam, 33 bytes
```
q~{X1$3$-:X*0>{\;}*}*](g\2/{~//}/
```
This can be golfed further.
Takes input from STDIN, like
```
[0.48 0.4 0.24 0.39 0.74 1.31 1.71 2.1 2.24 2.07 2.41]
```
and outputs the factor to STDOUT, like
```
10.866344605475046
```
[Try it online here](http://cjam.aditsu.net/)
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 18
```
u*GeS,1ceHhHC,QtQ1
```
Explanation:
```
u                 reduce, G is accumulator, H iterates over sequence
 *G               multiply G by
   eS             max(               
     ,1               1,
       ceHhH            H[1]/H[0])
 C                H iterates over zip(
  ,QtQ                                Q,Q[1:])
 1                G is initialized to 1
```
`max(H[1]/H[0],1)` idea thanks to @xnor
[Answer]
## C#, 333, 313
My first attempt. Could probably optimize it more but like I said first attempt so will get the hang of it!. 
```
double a(double [] b){var c=0.0;var d=1;for(int i=0;i<b.Count();i++){c=(d==1)?(((i+1)<b.Count()&&b[i+1]<=b[i]&&d==1)?((c==0)?b[i]:b[i]*c):((i+1)>=b.Count()?(c*b[i])/b[0]:c)):((i+1)<b.Count()&&b[i+1]>b[i]&&d==0)?c/b[i]:c;d=((i+1)<b.Count()&&b[i+1]<b[i]&&d==1)?0:((i+1)<b.Count()&&b[i+1]>b[i]&&d==0)?1:d;}return c;}
```
Input
```
0.48, 0.4, 0.24, 0.39, 0.74, 1.31, 1.71, 2.1, 2.24, 2.07, 2.41
```
Output
```
10.86
```
Edit: Thanks to DenDenDo for suggesting not using math.floor to round and using int instead of bool to cut chars. Will remember that for future puzzles!
]