[R-SIG-Finance] Building a GUI with R

John James jjbarn at btinternet.com
Mon Oct 6 15:09:13 CEST 2008


Hi
 
I think there are 2 or 3 parts to the problem, depending on how you see the requirements:
 
1 A system that will continuously run R in the background, for updating your plots and calculations.
 
2 Display and access R in a way that you can change your priority of interest and if necessary perform ad-hoc queries as quickly as possible.
 
3 A computing system capable of performing stress and back testing of strategies.
 
Architecturally I would separate the UI from the backend and I would choose a SOA (Service Oriented Architecture) approach for this separation as it gives flexibility of implementation strategies. You will certainly want to access some of the portals for additional data and therefore tackling this subject is worthwhile early on.
 
If you haven't had experience previously of developing a threaded application in .NET I would consider using a browser front end, programming in JavaScript and using AJAX technology. Visual Studio 2008 has extensive tools including an effective JavaScript debugger and will kick-start your development.
 
.NET provides powerful connection pooling and service management capabilities; unfortunately you will need to create a marshalling interface to the R threads but once this is done, running R remotely is simple. 
 
Note however that www.biocep.nethas already implemented most of the necessary functionality for server-side R execution and I would use this initially by scripting in R and Python while concentrating on developing the front-end that you want in .NET 

Regards

John James
Mango Solutions

 


----- Original Message ----
From: Alex Park <alex.park1 at ntlworld.com>
To: r-sig-finance at stat.math.ethz.ch
Sent: Monday, 6 October, 2008 11:26:33 AM
Subject: [R-SIG-Finance] Building a GUI with R

Hello

I am a private investor and have been wondering about the feasibility of
building my own personal piece of software to help with my investing. In
particular, I am thinking of a desktop application that has the following
features:

- Ability to open up a number of charts and be able to select markets /
stocks from a pre-populated list 

- Ability to have a trading log so I can book my own trades and see my
annualised returns and how this compares to various benchmarks

- Ability to link to a variety of data sources (e.g. FRED) and financial
news sources etc.

- Statistical framework so I can easily compare correlations within markets,
perform regressions etc.

As a bit of background, I used to do some of this in Excel in a crude way
using VBA. Then I discovered R and started investigating .NET (VB, C#, C++).
I think R is terrific for analysis and the functions it offers are great
e.g. getting Yahoo quotes, accessing FRED database etc.

What I'd like to do is build my own software in .NET (e.g. build trading log
GUI, place my daily market data within database etc.) but also have access
to R from within the software so that I can use it to build sophisticated
charts, do stats analysis, connect to different data sources e.g. Yahoo etc.

My question is: does this seem like a step to far for an amateur programmer
like me and / or does anybody have an experience in doing similar and could
advise on (a) whether .NET is best way to go, and (b) potential pitfalls.

Any comments gladly received.

Regards

Alex

_______________________________________________
R-SIG-Finance at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.




More information about the R-SIG-Finance mailing list