beautiful, thanks - I'll think about finding an analytic expression for R(K) using the fact that S follows GBM.
PS. on second thoughts, you are saying "if you replace f(S) by Smin whenever f(S)<=S(T), then this decreases the denominator in the ratio R without affecting the numerator, so it increases R".
But the numerator is zero whenever f(S)<=S(T), so you don't increase the ratio R by substituting f(S) with Smin.
So it seems to me that your optimal f is of the form f(S)=Smax on some set A, and it can be whatever you want on the complement of A - it could be Smin, or in particular it could be S(T).
From there it is easy to see that A=1, i.e the optimal f is of the form f(S)=Smax, so the conjecture is true? Am I missing something?