iron_warbler 2.0.7.25 → 2.0.7.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/iron_warbler/Card.scss +6 -0
- data/app/assets/stylesheets/iron_warbler/positions.scss +1 -1
- data/app/assets/stylesheets/iron_warbler/purses.scss +31 -0
- data/app/assets/stylesheets/iron_warbler/purses_summary.scss +31 -19
- data/app/assets/stylesheets/iron_warbler/utils.scss +28 -3
- data/app/controllers/iro/api/stocks_controller.rb +7 -4
- data/app/controllers/iro/application_controller.rb +6 -0
- data/app/controllers/iro/positions_controller.rb +188 -199
- data/app/controllers/iro/purses_controller.rb +3 -1
- data/app/controllers/iro/stocks_controller.rb +21 -2
- data/app/models/iro/datapoint.rb +1 -1
- data/app/models/iro/option.rb +50 -150
- data/app/models/iro/option_black_scholes.rb +149 -0
- data/app/models/iro/position.rb +155 -212
- data/app/models/iro/{price_item.rb → priceitem.rb} +5 -1
- data/app/models/iro/purse.rb +41 -4
- data/app/models/iro/stock.rb +2 -0
- data/app/models/iro/strategy.rb +121 -82
- data/app/models/tda/option.rb +1 -1
- data/app/models/tda/stock.rb +1 -1
- data/app/views/iro/_main_header.haml +8 -5
- data/app/views/iro/api/stocks/index.json.jbuilder +5 -0
- data/app/views/iro/api/stocks/show.json.jbuilder +11 -0
- data/app/views/iro/api/stocks/show.json.jbuilder-bk +12 -0
- data/app/views/iro/options/_show_mini.haml +8 -0
- data/app/views/iro/positions/_form.haml +11 -4
- data/app/views/iro/positions/_formpart_4data.haml +41 -38
- data/app/views/iro/positions/_gameui_long_debit_call_spread.haml +4 -4
- data/app/views/iro/positions/_gameui_long_debit_call_spread.haml-trash +42 -0
- data/app/views/iro/positions/_gameui_short_credit_call_spread.haml +38 -0
- data/app/views/iro/positions/_gameui_short_debit_put_spread.haml +1 -0
- data/app/views/iro/positions/_gameui_short_debit_put_spread.haml-trash +40 -0
- data/app/views/iro/positions/_header.haml +2 -0
- data/app/views/iro/positions/_header_long_debit_call_spread.haml +43 -25
- data/app/views/iro/positions/_header_short_credit_call_spread.haml +50 -0
- data/app/views/iro/positions/_new.haml +23 -0
- data/app/views/iro/positions/_prepare_long_debit_call_spread.haml +2 -3
- data/app/views/iro/positions/_prepare_short_credit_call_spread.haml +1 -0
- data/app/views/iro/positions/_prepare_short_debit_put_spread.haml +2 -1
- data/app/views/iro/positions/_table.haml +25 -26
- data/app/views/iro/positions/prepare.haml +6 -4
- data/app/views/iro/positions/prepare2.haml +15 -4
- data/app/views/iro/purses/_form_extra_fields.haml +18 -18
- data/app/views/iro/purses/_header.haml +12 -7
- data/app/views/iro/purses/_summary.haml +69 -62
- data/app/views/iro/purses/show.haml +4 -3
- data/app/views/iro/stocks/_form.haml +4 -3
- data/app/views/iro/stocks/edit.haml +4 -0
- data/app/views/iro/stocks/index.haml +21 -6
- data/app/views/iro/strategies/_form.haml +36 -26
- data/app/views/iro/strategies/_show.haml +7 -5
- data/config/routes.rb +7 -4
- data/lib/iro/engine.rb +1 -0
- data/lib/iron_warbler.rb +0 -2
- data/lib/tasks/iro_tasks.rake +2 -2
- metadata +17 -4
- data/app/views/iro/api/stocks/show.jbuilder +0 -11
- data/app/views/iro/positions/_gameui_short_debit_put_spread.haml +0 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 817fe321c59fe077810b34daaf097462c339ccbf7a2944845f1f460f3bff72cc
|
4
|
+
data.tar.gz: 10a0379b148bd595b730d63ab5b63cf624c4c3039c5586309981f840ad0869bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 015ce7410f643ea640082ccfc7f231009d527b287a24206eb5b3340a1571b477c95f2da9a9eaed8e7b2f0a1d0162a59f553029a57746a324be560083cbf92f5a
|
7
|
+
data.tar.gz: cabc439b34662c94886d6893138a51c4be2ace1b8a97fdc7a8fa0859bbea4178fca944043c50365a5b04093269688a95d1d8ce3e1e3c8d52293dac12d3f345c0
|
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
.purses--form-extra-fields {
|
3
|
+
background: rgba(255,255,255, 0.5);
|
4
|
+
padding: 0.3em 0;
|
5
|
+
margin-bottom: 0.5em;
|
6
|
+
|
7
|
+
line-height: 1.5em;
|
8
|
+
input {
|
9
|
+
height: 1.5em;
|
10
|
+
}
|
11
|
+
|
12
|
+
> div {
|
13
|
+
margin-bottom: 0.3em;
|
14
|
+
}
|
15
|
+
|
16
|
+
.unit {
|
17
|
+
min-width: 5em;
|
18
|
+
padding-left: 0.3em;
|
19
|
+
}
|
20
|
+
|
21
|
+
label {
|
22
|
+
min-width: 9em;
|
23
|
+
text-align: right;
|
24
|
+
padding-right: 0.3em;
|
25
|
+
}
|
26
|
+
|
27
|
+
input {
|
28
|
+
width: 4em;
|
29
|
+
}
|
30
|
+
|
31
|
+
}
|
@@ -40,32 +40,38 @@
|
|
40
40
|
.summary-amount {
|
41
41
|
position: relative;
|
42
42
|
width: 100px;
|
43
|
+
margin-right: 2em;
|
43
44
|
|
44
45
|
.net-gl {
|
45
46
|
width: 100%;
|
46
47
|
background: rgba(0,0,0, 0.5);
|
47
48
|
}
|
48
|
-
}
|
49
|
-
.summary-delta {
|
50
|
-
position: relative;
|
51
|
-
margin-right: 1em;
|
52
|
-
width: 1em;
|
53
49
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
width: 1em;
|
50
|
+
.delta {
|
51
|
+
position: absolute;
|
52
|
+
left: 100px;
|
53
|
+
height: 100%;
|
59
54
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
55
|
+
> div {
|
56
|
+
border: 1px dotted yellow;
|
57
|
+
width: 0.5em;
|
58
|
+
}
|
59
|
+
.begin {
|
60
|
+
width: 1em;
|
65
61
|
|
66
|
-
|
62
|
+
background: black;
|
63
|
+
}
|
64
|
+
.end {
|
65
|
+
width: .5em;
|
66
|
+
left: .25em;
|
67
|
+
|
68
|
+
background: rgba(255,0,0, 0.5);
|
69
|
+
}
|
67
70
|
}
|
71
|
+
|
68
72
|
}
|
73
|
+
|
74
|
+
|
69
75
|
.loss {
|
70
76
|
}
|
71
77
|
.gain {
|
@@ -73,12 +79,18 @@
|
|
73
79
|
.max-gl {
|
74
80
|
position: absolute;
|
75
81
|
width: 100%;
|
82
|
+
|
83
|
+
label {
|
84
|
+
position: absolute;
|
85
|
+
}
|
86
|
+
|
87
|
+
|
76
88
|
}
|
77
89
|
.max-gl.long {
|
78
|
-
background: rgba(255,0,0, 0.5);
|
79
90
|
}
|
80
|
-
.max-gl
|
81
|
-
|
91
|
+
.max-gl.short {
|
92
|
+
display: flex;
|
93
|
+
flex-direction: column-reverse;
|
82
94
|
}
|
83
95
|
.long {
|
84
96
|
position: absolute;
|
@@ -32,6 +32,11 @@
|
|
32
32
|
|
33
33
|
/* F */
|
34
34
|
|
35
|
+
.field {
|
36
|
+
min-width: 100px;
|
37
|
+
margin-right: 1em;
|
38
|
+
}
|
39
|
+
|
35
40
|
.flex-row {
|
36
41
|
display: flex;
|
37
42
|
margin-bottom: 0.4em;
|
@@ -43,11 +48,23 @@
|
|
43
48
|
position: relative;
|
44
49
|
background: white;
|
45
50
|
}
|
46
|
-
|
47
|
-
|
48
|
-
|
51
|
+
|
52
|
+
/**
|
53
|
+
* 2024-05-09
|
54
|
+
* label tightly above input
|
55
|
+
**/
|
56
|
+
.formrow-v1 {
|
57
|
+
display: flex;
|
58
|
+
align-items: flex-end;
|
59
|
+
label {
|
60
|
+
margin-bottom: 0;
|
61
|
+
}
|
62
|
+
> * {
|
63
|
+
margin-right: 0.3em;
|
64
|
+
}
|
49
65
|
}
|
50
66
|
|
67
|
+
|
51
68
|
/* H */
|
52
69
|
|
53
70
|
/* M */
|
@@ -78,6 +95,14 @@
|
|
78
95
|
|
79
96
|
}
|
80
97
|
|
98
|
+
/* P */
|
99
|
+
|
100
|
+
table.padded {
|
101
|
+
td {
|
102
|
+
padding: 0.5em;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
81
106
|
|
82
107
|
|
83
108
|
/* W */
|
@@ -3,12 +3,12 @@ class Iro::Api::StocksController < Iro::ApiController
|
|
3
3
|
before_action :set_stock, only: [:show, :edit, :update, :destroy]
|
4
4
|
|
5
5
|
def index
|
6
|
+
@stocks = Iro::Stock.active
|
6
7
|
authorize! :index, Iro::Stock
|
7
8
|
|
8
9
|
respond_to do |format|
|
9
|
-
format.
|
10
|
-
|
11
|
-
end
|
10
|
+
format.html
|
11
|
+
format.json
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
@@ -16,6 +16,7 @@ class Iro::Api::StocksController < Iro::ApiController
|
|
16
16
|
authorize! :show, @stock
|
17
17
|
end_on = Time.now.to_date.in_time_zone('UTC')
|
18
18
|
|
19
|
+
begin_on = ( Time.now - 1.year ).to_date.in_time_zone('UTC')
|
19
20
|
begin_on = params[:begin_on].to_date.in_time_zone('UTC') if params[:begin_on]
|
20
21
|
end_on = params[:end_on].to_date.in_time_zone('UTC') if params[:end_on]
|
21
22
|
|
@@ -29,12 +30,14 @@ class Iro::Api::StocksController < Iro::ApiController
|
|
29
30
|
when '1-yr'
|
30
31
|
begin_on = ( Time.now - 1.year ).to_date.in_time_zone('UTC')
|
31
32
|
# end_on = Time.now.to_date.in_time_zone('UTC')
|
33
|
+
when '5-yr'
|
34
|
+
begin_on = ( Time.now - 5.years ).to_date.in_time_zone('UTC')
|
32
35
|
end
|
33
36
|
|
34
37
|
@datapoints = Iro::Datapoint.where({
|
35
38
|
:quote_at.gte => begin_on,
|
36
39
|
:quote_at.lte => end_on,
|
37
|
-
symbol:
|
40
|
+
symbol: params[:ticker],
|
38
41
|
}).order_by({ quote_at: :asc })
|
39
42
|
end
|
40
43
|
|
@@ -1,4 +1,9 @@
|
|
1
1
|
|
2
|
+
Pu ||= Iro::Purse
|
3
|
+
Str ||= Iro::Strategy
|
4
|
+
Po ||= Iro::Position
|
5
|
+
O ||= Iro::Option
|
6
|
+
Sto ||= Iro::Stock
|
2
7
|
|
3
8
|
class Iro::ApplicationController < Wco::ApplicationController
|
4
9
|
layout 'iro/application'
|
@@ -17,6 +22,7 @@ class Iro::ApplicationController < Wco::ApplicationController
|
|
17
22
|
def set_lists
|
18
23
|
@purses = Iro::Purse.all
|
19
24
|
@strategies = Iro::Strategy.all
|
25
|
+
@strategies_list = Iro::Strategy.list
|
20
26
|
end
|
21
27
|
|
22
28
|
|