SpeadBox theo default formatting set to 4 dec places
This commit is contained in:
1 parent
a9ec9e87be
commit
9218184ef1
5 files changed
+6
-115
No files matched your search
@@ -55,6 +55,11 @@ namespace BCG {
|
||||
}
|
||||
pos[i] = get_option_position == null ? Double.NaN : get_option_position(leg_sec.contract.product, leg_sec.contract.expiration, leg_sec.contract.strike, leg_sec.contract.isCall);
|
||||
}
|
||||
// TODO: put it as a setting
|
||||
bts.Log.assert(theos.Length == drivers.Length);
|
||||
for (int i = 0; i < theos.Length; i++) {
|
||||
theos[i] /= drivers[i];
|
||||
}
|
||||
return new SpreadValue(spread_spec, theos, deltas, gammas, vegas, adj_vegas, oevs, thetas, slope_vegas, drivers, qs_midpoint_theos, pos, additional_delta);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
// using System;
|
||||
// using System.Collections.Generic;
|
||||
// using System.Linq;
|
||||
// using System.Text;
|
||||
// using System.Threading.Tasks;
|
||||
|
||||
// namespace BCG
|
||||
// {
|
||||
// [DataStreamUserRespresentation ("spreadFavorites")]
|
||||
// public class SpreadFavoriteListStream : ViewStream
|
||||
// {
|
||||
// public SpreadFavoriteListStream()
|
||||
// : this(ViewStreamDatabase.instance)
|
||||
// { }
|
||||
|
||||
// public SpreadFavoriteListStream(ViewStreamDatabase vsd)
|
||||
// {
|
||||
// mySetRealSource(new SuperJoinStream(new TableStream("spread_favorite_entries", vsd),
|
||||
// "spread_favorite_group_fk",
|
||||
// "!id",
|
||||
// new TableStream("spread_favorite_groups", vsd),
|
||||
// "id",
|
||||
// "!id"));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
@@ -1,9 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BCG
|
||||
{
|
||||
}
|
||||
+1
-1
@@ -25,7 +25,7 @@ namespace BCG {
|
||||
[DisplayInfo(name = "Driver shift interval")]
|
||||
public double driver_shift_interval { get { return is_set_to_default ? ((SpreadWindowSymbolBasedFormatting)default_instance).driver_shift_interval : _driver_shift_interval; } set { _driver_shift_interval = value; } }
|
||||
|
||||
private TickConverter2.TickType _theo_format = TickConverter2.TickType.tickDecimal2;
|
||||
private TickConverter2.TickType _theo_format = TickConverter2.TickType.tickDecimal4;
|
||||
[ProtoMember(6)]
|
||||
[DisplayInfo(name = "Theo Format")]
|
||||
public TickConverter2.TickType theo_format { get { return is_set_to_default ? ((SpreadWindowSymbolBasedFormatting)default_instance).theo_format : _theo_format; } set { _theo_format = value; } }
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
// using System;
|
||||
// using System.Collections.Generic;
|
||||
// using System.Text;
|
||||
// using BCG.Utilities;
|
||||
|
||||
// namespace BCG
|
||||
// {
|
||||
// public class TodayStream : ViewStream
|
||||
// {
|
||||
// public TodayStream(ViewStream target, string timecol) : this(target, timecol, ViewStreamDatabase.instance)
|
||||
// { }
|
||||
// public TodayStream(ViewStream target, string timecol, ViewStreamDatabase db) {
|
||||
// ViewStream day = new JoinStream(new AddColumnsStream(target, "fakeColumnX=1"), "fakeColumnX", "!fakeColumnX id",
|
||||
// new AddColumnsStream(new DayStream(0, new TimeSpan(0), db), "fakeColumnY=1"), "fakeColumnY", "!fakeColumnY id");
|
||||
// ViewStream dayFilter = new ProjectStream(new FilterStream(day, timecol + " >= dateTime"), "!dateTime");
|
||||
// mySetRealSource(dayFilter);
|
||||
// }
|
||||
// }
|
||||
|
||||
// public class ExactTodayStream : ViewStream
|
||||
// {
|
||||
// public ExactTodayStream(ViewStream target, string timecol)
|
||||
// {
|
||||
// ViewStream day = new JoinStream(new AddColumnsStream(target, "fakeColumnX=1"), "fakeColumnX", "!fakeColumnX id",
|
||||
// new AddColumnsStream(new DayStream(0), "fakeColumnY=1"), "fakeColumnY", "!fakeColumnY id");
|
||||
// ViewStream dayFilter = new ProjectStream(new FilterStream(day, timecol + " = dateTime"), "!dateTime");
|
||||
// mySetRealSource(dayFilter);
|
||||
// }
|
||||
// }
|
||||
|
||||
// public class PreTodayStream : ViewStream
|
||||
// {
|
||||
// public PreTodayStream(ViewStream target, string timecol)
|
||||
// {
|
||||
// ViewStream day = new JoinStream(new AddColumnsStream(target, "fakeColumnX=1"), "fakeColumnX", "!fakeColumnX id",
|
||||
// new AddColumnsStream(new DayStream(0), "fakeColumnY=1"), "fakeColumnY", "!fakeColumnY id");
|
||||
// ViewStream dayFilter = new ProjectStream(new FilterStream(day, timecol + " < dateTime"), "!dateTime");
|
||||
// mySetRealSource(dayFilter);
|
||||
// }
|
||||
// }
|
||||
|
||||
// public class SharedSpreadsStream : ViewStream, IStreamMapper
|
||||
// {
|
||||
// public SharedSpreadsStream()
|
||||
// : this(ViewStreamDatabase.instance)
|
||||
// { }
|
||||
|
||||
// public SharedSpreadsStream(ViewStreamDatabase vsd)
|
||||
// {
|
||||
// ViewStream rs = new TableStream("SharedSpreads", vsd);
|
||||
// rs = new MapStream(rs, this);
|
||||
// mySetRealSource(rs);
|
||||
// }
|
||||
|
||||
// private IBlueTableSchema _schema = null;
|
||||
// public IBlueTableSchema getOutputSchema(IBlueTableSchema s)
|
||||
// {
|
||||
// if (_schema == null)
|
||||
// {
|
||||
// _schema = BlueDataUtility.add_column(s, "spread_text", typeof(string));
|
||||
// _schema = BlueDataUtility.add_column(_schema, "spread_id", typeof(int));
|
||||
// }
|
||||
// return _schema;
|
||||
// }
|
||||
|
||||
// public IBlueRow map(IBlueRow r)
|
||||
// {
|
||||
// getOutputSchema(r.schema);
|
||||
// MutableBlueRow rv = new MutableBlueRow(_schema, r);
|
||||
// string spread_text;
|
||||
// SpreadInterpreter.interpret(r.get<string>("spread", String.Empty), out spread_text);
|
||||
// rv.setValue("spread_text", spread_text);
|
||||
// rv.setValue("spread_id", r["id"]);
|
||||
// rv.setValue("time", r.get_datetime("time").ToLocalTime());
|
||||
// return rv;
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
Reference in new issue
Block a user