Nope, there is absolutely no way to do this with python or ruby. :)
Seriously though, there are some existing frameworks and products that you could check out. I haven't used this myself, it's just in my bookmarks:
http://www.rapidquant.com/features
A C++ library with python bindings: http://quantlib.org/index.shtml
And a low level library for data analysis: http://pandas.pydata.org