Просмотр исходного кода

Merge branch 'ironfly' of https://github.com/laxaurus/finopt.git into
ironfly

Conflicts:
src/rethink/portfolio_item.py
src/ws/client_g.html
src/ws/ws_server.py

bobhk 8 лет назад
Родитель
Сommit
6dc8305b0a
3 измененных файлов с 30 добавлено и 0 удалено
  1. 3 0
      src/rethink/portfolio_item.py
  2. 23 0
      src/ws/client_g.html
  3. 4 0
      src/ws/ws_server.py

+ 3 - 0
src/rethink/portfolio_item.py

@@ -163,7 +163,10 @@ class PortfolioItem():
                                 
                 pos_theta = 0
                 gamma_percent = 0
+<<<<<<< HEAD
                 
+=======
+>>>>>>> branch 'ironfly' of https://github.com/laxaurus/finopt.git
                 # (S - X) * pos * multiplier
                 unreal_pl = (spot_px * multiplier - self.get_average_cost() ) * self.get_quantity() 
                                

+ 23 - 0
src/ws/client_g.html

@@ -56,6 +56,7 @@
     	var colorF = new google.visualization.ColorFormat();
     	colorF.addRange(-100, 0, 'white', 'red');
     	colorF.addRange(0, 100, 'white', 'blue');
+<<<<<<< HEAD
 
 
 	var colorGF = new google.visualization.ColorFormat();
@@ -71,6 +72,17 @@
 	    numF.format(data, 11); // position theta
 	    numF.format(data, 12); // position gamma
 	    colorGF.format(data, 13); //unreal p/l
+=======
+    	 	    
+	    
+	    numF.format(data, 3);  //market value
+	    colorF.format(data, 6); // position
+	    percentF.format(data, 7); //delta		
+	    percentF.format(data, 8); //theta    
+	    numF.format(data, 10); // position delta
+	    numF.format(data, 11); // position theta
+	    numF.format(data, 13); //unreal p/l
+>>>>>>> branch 'ironfly' of https://github.com/laxaurus/finopt.git
 	    barF.format(data, 14) //% gain loss
 		
 	}	   
@@ -99,9 +111,17 @@
 			console.log(d1);
 			data = new google.visualization.DataTable(d1.value);
 			view = new google.visualization.DataView(data);
+<<<<<<< HEAD
 			view.setRows(view.getFilteredRows([{column: 15, test: function(value, row, column, table) {
+=======
+			/*view.setRows(view.getFilteredRows([{column: 14, test: function(value, row, column, table) {
+>>>>>>> branch 'ironfly' of https://github.com/laxaurus/finopt.git
         return (value == 'HSI' || value == 'MHI') 
+<<<<<<< HEAD
     }}]));
+=======
+    }}]));*/
+>>>>>>> branch 'ironfly' of https://github.com/laxaurus/finopt.git
     		setupFormatter(data);
 			table = new google.visualization.Table(document.getElementById('table_div'));
 			table.draw(view, options);
@@ -120,6 +140,7 @@
 			table.draw(view, options);
 //			table.draw(data);           
 
+<<<<<<< HEAD
         } else if (d1.event == 'event_tm_table_row_inserted'){
         	var newRow = d1.value.row_values.map(function(x){
         		return x['v'];
@@ -128,6 +149,8 @@
         	data.addRow(newRow);
         	options.sortColumn = table.getSortInfo().column;
         	table.draw(view, options);
+=======
+>>>>>>> branch 'ironfly' of https://github.com/laxaurus/finopt.git
         }
         
       };

+ 4 - 0
src/ws/ws_server.py

@@ -146,7 +146,11 @@ class PortfolioTableModelListener(BaseMessageListener):
     '''
     
     '''
+<<<<<<< HEAD
     CACHE_MAX = 12
+=======
+    CACHE_MAX = 15
+>>>>>>> branch 'ironfly' of https://github.com/laxaurus/finopt.git
     TIME_MAX = 1.0
     
     def __init__(self, name, server_wrapper):