PRO+ http://blog.pro-plus.biz Business Intelligence Zone posterous.com Wed, 17 Nov 2010 00:28:04 -0800 ConPA release 20101117 http://blog.pro-plus.biz/conpa-release-20101117 http://blog.pro-plus.biz/conpa-release-20101117 Fixed asset autocomplete url.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/634006/NewYork_Marathon_2007_7.jpg http://posterous.com/users/5Bcds5lhBd5L Alberto Santini albertosantini Alberto Santini
Mon, 01 Nov 2010 06:55:16 -0700 ConPA release 20101101 http://blog.pro-plus.biz/conpa-release-20101101 http://blog.pro-plus.biz/conpa-release-20101101 Added weights and constraints info in dashboard tooltip.

Updated to YUI 2.8.2.

Migrated to Webbynode.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/634006/NewYork_Marathon_2007_7.jpg http://posterous.com/users/5Bcds5lhBd5L Alberto Santini albertosantini Alberto Santini
Wed, 29 Sep 2010 01:11:42 -0700 Aptana migration experience http://blog.pro-plus.biz/aptana-migration-experience http://blog.pro-plus.biz/aptana-migration-experience

A few days ago I received an email notifying Aptana Cloud Service Termination at midnight on October 31, 2010.

Period. Sigh. :(

As early adopter (2008) about Jaxer technology and team supporter in the old forum (1000+ posts), I am quite sad.

However the show must go on and I found some hints in Aptana Cloud Migration Notes.

In this post I am glad to give you a feedback about the first steps of my migration experience.

My Cloud Server configuration is quite simple: Subversion repository, Apache HTTP Server and Jaxer JavaScript server. I have one main application deployed and other stuff I consider secondary. Fortunately I have been using an external CouchDB instance as persistence layer.

The migration approach has only one principle: moving off in time minimizing the problems. After the migration I will have plenty of time to do the things with bells and whistles.

The repository is the first target. I have no secrets in the source code, but I cannot share a few api keys contained in the backend. Maybe I will change it, but, in the meantime, I cannot use a public repository.

Because I have been developing with Yahoo! User Interface (YUI) library and I intend to contribute to the YUI gallery, I have a GitHub account. I upgraded my free plan to micro one (7$/month) to create private repositories.

How to import a Subversion Repository?

GitHub offers some solutions, but I have the following thought: in the last two years I didn't compare any trunk version with a tagged one. In that case I might browse my backups. So I preferred to take the latest status of svn repo and to push it to git one. Fast, simple and no problems.

Repository issue is gone. Now I have Apache and Jaxer issues.

I have been looking for a VPS hosting. I spent a lot of time comparing VPS hosting providers and reading reviews. I am not a VPS expert and my needs are simple.

I would be oriented about Webbynode provider: 9.99$/month for Webby 256 plan. Please no flame, there are many good solutions. :) I can always change in the future and, at the moment, I need something cheap and simple to manage.

Before to buy the plan, I would like to replicate on a local machine my configuration.

I have a Windows 7 box. It comes with Windows Virtual PC installed. I suppose you could use Virtual Box too.

I downloaded the PC (Intel x86) server install CD (10.04.1) from Ubuntu. I created a virtual machine with 256Mb of memory and installed the server image. Don't forget to set correctly the network adapter in the settings. There is no integration components for Linux guest, allowing disk sharing, but I don't need it: I have to simulate a VPS hosting box.

The installation had no issues, but when I rebooted for the first time I could not see the login prompt, because the display was scrambled. I rebooted and pressed left shift to enter in Grub menu: I added at the end of kernel line "vga=785" (without quotes, it means 640x480 with depth 16) and rebooted. The display was nice and after the logon I added "vga=785" in GRUB_CMDLINE_LINUX variable contained in "/etc/default/grub" file.

Of course this change is only for the local machine, no need for a remote machine. I will login to the VPS hosting box with a terminal emulator.

I upgraded to the latest fixes with "apt-get upgrade" and rebooted.

An Ubuntu server box was up and running with 256Mb RAM and networking capabilities.

I enabled the firewall and opened a few ports, remembering if you enable the firewall before allowing ssh port you are lock out:

sudo ufw allow 22

sudo ufw enable
sudo ufw allow 8081
sudo ufw allow 80

I installed the ssh server (I imagine in the VPS hosting box it is installed):

sudo apt-get install openssh-server

I installed "firefox" package (server side?) because Jaxer needs many shared libraries contained in that package:

sudo apt-get install firefox

Please, you should create a directory structure you like: I don't annoy you with change directory commands. I hope the context is clear for the following commands.

I downloaded the latest Jaxer version (1.0.3.4547):

wget http://release.aptana.com/jaxer-standalone/latest/linux32/Jaxer_package_withApache.tar.gz

Unpacked Jaxer:

tar xvf Jaxer_package_withApache.tar.gz

I changed directory to "AptanaJaxer/scripts" directory and started Apache and Jaxer instances:

./start.sh

I opened the browser in Windows and tested the server installation:

http://ip_address_of_the_server:8081

It should be redirected to

http://ip_address_of_the_server:8081/aptana/

Aptana Jaxer homepage is displayed.

Then in "AptanaJaxer/Apache22/conf/httpd.conf" file I changed the port from 8081 to 80 and added the User directive:

... Listen 80
... ServerName localhost:80
... User www-data

I stopped the instances. Then I restarted Apache and Jaxer instance with root permission because a user without admin rights could not bind 80 port:

sudo ./start.sh

"http://ip_address_of_the_server" should work nice.

You can logout: Apache and Jaxer instances continue running correctly.

This is the end of story. 

I deployed my application to local box using rsync and, adding a coherent symbolic link in "AptanaJaxer/public" directory to the application one, I could use the same url of my actual Aptana Cloud instance (but ip address, of course).

Mission accomplished.

It is not the professional configuration you can find in Aptana Cloud instance, but it works nice.

The next step would be replicate the above steps in the VPS hosting box, adding a few security steps and changing the DNS.

That's all, folks.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/634006/NewYork_Marathon_2007_7.jpg http://posterous.com/users/5Bcds5lhBd5L Alberto Santini albertosantini Alberto Santini
Wed, 22 Sep 2010 11:31:00 -0700 ConPA release 20100922 http://blog.pro-plus.biz/conpa-release-20100922 http://blog.pro-plus.biz/conpa-release-20100922

Eventually we added a Dashboard tab.

There are stats of all portfolios created by the users: last created portfolios, best/worst performing, high/low risk profile and high/low return profile portfolios. Every time a portfolio is optimized, it is added to the repository. You can refresh the Dashboard switching to Basket tab and coming back again.

Hovering on the portfolio id, a tooltip is displayed, containing performance, risk (the standard deviation of the portfolio returns) and return of the portfolio.

Enjoy!

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/634006/NewYork_Marathon_2007_7.jpg http://posterous.com/users/5Bcds5lhBd5L Alberto Santini albertosantini Alberto Santini
Thu, 16 Sep 2010 12:10:32 -0700 ConPA release 20100916 http://blog.pro-plus.biz/conpa-release-20100916 http://blog.pro-plus.biz/conpa-release-20100916 Internal refactoring preparing a dashboard for portfolio reports.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/634006/NewYork_Marathon_2007_7.jpg http://posterous.com/users/5Bcds5lhBd5L Alberto Santini albertosantini Alberto Santini
Fri, 10 Sep 2010 09:38:45 -0700 ConPA release 20100910 http://blog.pro-plus.biz/conpa-release-20100910 http://blog.pro-plus.biz/conpa-release-20100910
We are glad to announce we have been saving the optimized portfolios to a shared CouchDB cluster, Cloudant

In the ConPA interface there is no trace about that (yet), but since now we can provide reports or graphs about the portfolio composition, return, risk or performance. For instance, we can display the most recent portfolios, sorting the portfolios by return, risk or performance, or we can create a scatter plot, hilighting the relations between portfolios.

Updated to YUI 3.2.0.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/634006/NewYork_Marathon_2007_7.jpg http://posterous.com/users/5Bcds5lhBd5L Alberto Santini albertosantini Alberto Santini
Fri, 03 Sep 2010 14:26:59 -0700 ConPA release 20100903 http://blog.pro-plus.biz/conpa-release-20100903 http://blog.pro-plus.biz/conpa-release-20100903 Updated to YUI 3.1.2.

Fixed implied volatility because the provider changed page style.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/634006/NewYork_Marathon_2007_7.jpg http://posterous.com/users/5Bcds5lhBd5L Alberto Santini albertosantini Alberto Santini
Wed, 21 Jul 2010 06:15:11 -0700 ConPA release 20100721 http://blog.pro-plus.biz/conpa-release-20100721 http://blog.pro-plus.biz/conpa-release-20100721 Fixed loading YUI 2.8.1 stylesheets twice: the first time from html page, the second one from YUI 3.1.1 loader.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/634006/NewYork_Marathon_2007_7.jpg http://posterous.com/users/5Bcds5lhBd5L Alberto Santini albertosantini Alberto Santini
Mon, 19 Jul 2010 14:02:00 -0700 ConPA release 20100719 http://blog.pro-plus.biz/conpa-release-20100719 http://blog.pro-plus.biz/conpa-release-20100719

After two years of development, ConPA, an asset allocation application, achieves the stable state.

The main features are portfolio optimization with constraints, portfolio simulation, pie and performance charts, year to date graph, key statistics and implied volatility graph.

Thanks to Yahoo! User Interface library and Yahoo! Finance.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/634006/NewYork_Marathon_2007_7.jpg http://posterous.com/users/5Bcds5lhBd5L Alberto Santini albertosantini Alberto Santini
Thu, 15 Jul 2010 17:29:00 -0700 ConPA release 20100715 http://blog.pro-plus.biz/2010/07/conpa-release-20100715.html http://blog.pro-plus.biz/2010/07/conpa-release-20100715.html After reading The only thing smiling today is Volatility, I ported (better copied) Black-Scholes formula to JavaScript server-side - BLACK-SCHOLES TO THE PEOPLE.

You can found the implied volatility graphs in key statistics panel: you should add a stock to the portfolio and click on the symbol name.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/634006/NewYork_Marathon_2007_7.jpg http://posterous.com/users/5Bcds5lhBd5L Alberto Santini albertosantini Alberto Santini
Sun, 06 Jun 2010 10:42:00 -0700 ConPA release 20100606 http://blog.pro-plus.biz/2010/06/conpa-release-20100606.html http://blog.pro-plus.biz/2010/06/conpa-release-20100606.html Fixed a cosmetic issue for "Most Used Symbols" button using Chromium.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/634006/NewYork_Marathon_2007_7.jpg http://posterous.com/users/5Bcds5lhBd5L Alberto Santini albertosantini Alberto Santini
Tue, 18 May 2010 16:23:00 -0700 ConPA release 20100518 http://blog.pro-plus.biz/2010/05/conpa-release-20100518.html http://blog.pro-plus.biz/2010/05/conpa-release-20100518.html Replaced get quotes autocomplete with new Yahoo! API.
Fixed static private variables and methods beginning with char "_".
JSLint is happy.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/634006/NewYork_Marathon_2007_7.jpg http://posterous.com/users/5Bcds5lhBd5L Alberto Santini albertosantini Alberto Santini
Sun, 16 May 2010 14:10:00 -0700 Yahoo! Finance Get Quote AutoComplete http://blog.pro-plus.biz/2010/05/yahoo-finance-get-quote-autocomplete.html http://blog.pro-plus.biz/2010/05/yahoo-finance-get-quote-autocomplete.html

In Yahoo! Finance homepage there is a quotes search with an autocomplete box.

In ConPA, two years ago, we implemented that feature replicating Finance SymbolSuggest namespace.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
YAHOO.namespace("Finance.SymbolSuggest");
YAHOO.Finance.SymbolSuggest.ssCallback = function (o) {
  var callback = YAHOO.util.ScriptNodeDataSource
     .callbacks[YAHOO.util.ScriptNodeDataSource._nId - 1];
  if (typeof callback === 'function') {
      callback(o);
  }
};

...

var sUri = "http://d.yimg.com/autoc.finance.yahoo.com/autoc?",
  query = "callback=YAHOO.Finance.SymbolSuggest.ssCallback&query",
  oDS, oAC;


oDS = new YAHOO.util.ScriptNodeDataSource(sUri);

oDS.responseSchema = {
  resultsList: "ResultSet.Result",
  fields: ["symbol", "name", "exch", "type", "exchDisp"]
};
oDS.scriptQueryParam = query;

oAC = new YAHOO.widget.AutoComplete("ysearchinput",
   "ysearchcontainer", oDS);

...

In the meantime, I think, the API is changed and we simplified that code.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
var sUri = "http://d.yimg.com/aq/autoc", oDS, oAC;

oDS = new YAHOO.util.ScriptNodeDataSource(sUri);

oDS.responseSchema = {
  resultsList: "ResultSet.Result",
  fields: ["symbol", "name", "exch", "type", "exchDisp"]
};

oDS.generateRequestCallback = function (id) {
  YAHOO.util.ScriptNodeDataSource.callbacks =
      YAHOO.util.ScriptNodeDataSource.callbacks[id];
  return "&" + this.scriptCallbackParam +
      "=YAHOO.util.ScriptNodeDataSource.callbacks";
};

oAC = new YAHOO.widget.AutoComplete("ysearchinput",
   "ysearchcontainer", oDS);

oAC.generateRequest = function (sQuery) {
  return "?region=US〈=en-US&query=" + sQuery;
};

...

You can give a look to the complete source code in ConPA.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/634006/NewYork_Marathon_2007_7.jpg http://posterous.com/users/5Bcds5lhBd5L Alberto Santini albertosantini Alberto Santini
Sat, 15 May 2010 08:10:00 -0700 ConPA release 20100515 http://blog.pro-plus.biz/2010/05/conpa-release-20100515.html http://blog.pro-plus.biz/2010/05/conpa-release-20100515.html Updated to YUI 3.1.1 and YUI 2.8.1.

Fixed R script for assets as, for instance, "EUR=X", "^IRX" or "^GPSC".

Fixed the time series if it contains zero values: the zeroes are replaced with the previous value not equals to zero. For instance, 0 0 1 2 4 2 0 0 1 0 7 0 0 is converted to 1 1 1 2 4 2 2 2 1 1 7 7 7. There are assets containing zero values, for instance "^IRX".

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/634006/NewYork_Marathon_2007_7.jpg http://posterous.com/users/5Bcds5lhBd5L Alberto Santini albertosantini Alberto Santini
Wed, 05 May 2010 15:12:00 -0700 ConPA release 20100505 http://blog.pro-plus.biz/2010/05/conpa-release-20100505.html http://blog.pro-plus.biz/2010/05/conpa-release-20100505.html Two cosmetic issues.

Aligned the button of the most used symbols.
Added a label to the target return button.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/634006/NewYork_Marathon_2007_7.jpg http://posterous.com/users/5Bcds5lhBd5L Alberto Santini albertosantini Alberto Santini
Sun, 02 May 2010 13:57:00 -0700 ConPA release 20100502 http://blog.pro-plus.biz/2010/05/conpa-release-20100502.html http://blog.pro-plus.biz/2010/05/conpa-release-20100502.html Updated optimization code corresponding to R package quadprog 1.5.3.
Fixed the width of the asset stats panel.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/634006/NewYork_Marathon_2007_7.jpg http://posterous.com/users/5Bcds5lhBd5L Alberto Santini albertosantini Alberto Santini
Fri, 23 Apr 2010 14:59:00 -0700 ConPA release 20100423 http://blog.pro-plus.biz/2010/04/conpa-release-20100423.html http://blog.pro-plus.biz/2010/04/conpa-release-20100423.html Imitating a well-known concept of the open source model, ConPA makes a transparent process: now the user can reproduce the weights of the optimal portfolio. If you want to check the figures, you can click on the script icon, close to the help icon, and an R script, corresponding to the optimal portfolio, is displayed.

De facto, an "Open Finance" paradigm.

Updated to YUI 3.1.0 using YUI 2 in 3 compatibility.

Removed inputEx dependency. It was only used to create the panel containing the asset statistics. Now there is a native implementation without external libraries.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/634006/NewYork_Marathon_2007_7.jpg http://posterous.com/users/5Bcds5lhBd5L Alberto Santini albertosantini Alberto Santini
Sun, 11 Apr 2010 09:18:00 -0700 ConPA release 20100411 http://blog.pro-plus.biz/2010/04/conpa-release-20100411.html http://blog.pro-plus.biz/2010/04/conpa-release-20100411.html Updated to YUI 3.1.0 using yui2 module gallery wrapper.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/634006/NewYork_Marathon_2007_7.jpg http://posterous.com/users/5Bcds5lhBd5L Alberto Santini albertosantini Alberto Santini
Fri, 18 Sep 2009 22:18:00 -0700 ConPA release 20090919 http://blog.pro-plus.biz/2009/09/conpa-release-20090919.html http://blog.pro-plus.biz/2009/09/conpa-release-20090919.html Updated to YUI 2.8.0r4.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/634006/NewYork_Marathon_2007_7.jpg http://posterous.com/users/5Bcds5lhBd5L Alberto Santini albertosantini Alberto Santini
Thu, 23 Apr 2009 17:15:00 -0700 CReMA release 20090423 http://blog.pro-plus.biz/2009/04/crema-release-20090423.html http://blog.pro-plus.biz/2009/04/crema-release-20090423.html CReMA - Customer RElationship Management Application - is a proof of concept about social network analysis written in JavaScript.

The initial page of CReMA display an input field filled with the url of a forum, the "Getting Started with Studio" section of Aptana forum. You can scrape any forum based on phpBB forum solution: the url is not the root of the forum, but it is referred to a section, containing the topics list.

Pressing the "Search" button, the forum is scraped, retrieving authors, coauthors and tags information.

The scraping phase collects data using only the first page of the section - about 40 posts without sticky posts - and only the first page of each post. The process should take less than one minute and the display is updated for each post. The result is cached client-side expiring every day.

After the scraping phase, CReMA displays two tag clouds and two social networks graphs.

The left cloud contains the authors and the coauthors of the posts. The right one contains the tags of the posts. The left graph displays the relationship between the post author and his coauthors. The right one displays the relationship between the post author and the content of the post, summarized with a tag.

You can hover the mouse on the graph nodes, displaying the name of the author, coauthor or tags. Clicking on a node of the author graph, you can higlight the tags related with the author; or clicking on a node of the tag graph, you can highlight the author of the post. Clicking on the cloud the behaviour is similar. Furthermore if you double click on a node, you can go to the post related with the author or the tag.

Author, coauthor and content of the post is scraped using jQuery server-side. The content of the post is tagged with the Term Extraction Documentation for Yahoo! Search service. The layout of the graphs is calculated implementing the Fruchterman-Reingold algorithm.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/634006/NewYork_Marathon_2007_7.jpg http://posterous.com/users/5Bcds5lhBd5L Alberto Santini albertosantini Alberto Santini