Skip to content

Commit d58f83b

Browse files
committed
separate out the contraction it is, from the possessive its, and one stray typo
1 parent c58895a commit d58f83b

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

DONE_TO_DO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
* Added get_trading_rule_list and get_all_forecasts to forecast_combine
193193
* Added rule_variations config option
194194
* Added Bund data to test suite; had to fix some tests
195-
* Pooling for forecast scalar doesn't need it's own function anymore
195+
* Pooling for forecast scalar doesn't need its own function anymore
196196
* Changed the way config defaults are handled
197197
* Fixed bugs: use of bool to convert str
198198
* Fixed bugs: some test configs had wrong trading rule parameter setup; had to fix slew of tests as a result

docs/userguide.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ Can also be referenced like so: `systems.futures.rules.ewmac`
319319

320320
Also note that the list of data for the rule will also be in the form of string references to methods in the system object. So for example to get the daily price we'd use the method `system.rawdata.daily_prices(instrument_code)` (for a list of all the data methods in a system see [stage methods](#table_system_stage_methods) or type `system.rawdata.methods()` and `system.rawdata.methods()). In the trading rule specification this would be shown as "rawdata.daily_prices".
321321

322-
If no data is included, then the system will default to passing a single data item - the price of the instrument. Finally if any or all the `other_arg` keyword arguments are missing then the function will use it's own defaults.
322+
If no data is included, then the system will default to passing a single data item - the price of the instrument. Finally if any or all the `other_arg` keyword arguments are missing then the function will use its own defaults.
323323

324324
At this stage we can also remove any trading rules that we don't want. We also ought to modify the forecast scalars (See [forecast scale estimation](#scalar_estimate]), forecast weights and probably the forecast diversification multiplier ( see [estimating the forecast diversification multiplier](#divmult)). If you're estimating weights and scalars (i.e. in the pre-baked estimated futures system provided) this will be automatic.
325325

@@ -1074,7 +1074,7 @@ Warning: Be careful about changing a system from estimated to non estimated 'on
10741074

10751075
### Using the system object
10761076

1077-
The system object doesn't do very much in itself, except provide access to it's 'child' stages, and a limited number of methods. The child stages are all attributes of the parent system.
1077+
The system object doesn't do very much in itself, except provide access to its 'child' stages, and a limited number of methods. The child stages are all attributes of the parent system.
10781078

10791079
#### Accessing child stages, data, and config within a system
10801080

@@ -1507,7 +1507,7 @@ For reference here is [`calc_or_cache_nested`](/systems/basesystem.py). Notice t
15071507
If itemname[instrument_code][keyname] exists return it.
15081508
Else call func with arguments: self, instrument_code, keyname, *args
15091509
and **kwargs if we have to call the func updates the dictionary with
1510-
it's value
1510+
its value
15111511
15121512
Used for cache within various kinds of objects like config, price,
15131513
data, system...
@@ -1779,7 +1779,7 @@ This approach (which you can also think of as the stage "API") is used to make i
17791779

17801780
### Using a different set of stages
17811781

1782-
There are different versions of certain stages available; for example we can use either `ForecastScaleCapFixed` or `ForecastScaleCapEstimated`. Additionally you can add new kinds of stages if desired (see below), and remove stages you don't need (though you can't remove intermediate stages that a remaining stage would need to work out it's results).
1782+
There are different versions of certain stages available; for example we can use either `ForecastScaleCapFixed` or `ForecastScaleCapEstimated`. Additionally you can add new kinds of stages if desired (see below), and remove stages you don't need (though you can't remove intermediate stages that a remaining stage would need to work out its results).
17831783

17841784
It's best to create a new 'pre-baked' system by copying and modifying a file such as [this](/systems/provided/futures_chapter_15/basesystem.py). You need to import the new stages you require and then put them into the system, like so:
17851785

@@ -1812,7 +1812,7 @@ If you're going to write a new stage (completely new, or to replace an existing
18121812
5. Consider using a [*switching*](#switch_persistence) stage like [class `ForecastCombine`](/systems/forecast_combine.py) (there are similar switches for forecast scaling and portfolios).
18131813
6. Think about whether you need to protect part of the system cache for this stage output [system caching](#caching). To do this create a list in the attribute `_protected` with the item names you wish to protect.
18141814
6a. Similarly if you're going to cache complex objects that won't pickle easily (like accountCurve objects) you need to add the item name to the attribute '_nopickle'.
1815-
7. If you're inheriting from another stage be sure to add to it's list of protected items, rather than replacing it.
1815+
7. If you're inheriting from another stage be sure to add to its list of protected items, rather than replacing it.
18161816
8. Use non-cached input methods to get data from other stages. Be wary of accessing internal methods in other stages; try to stick to output methods only.
18171817
9. Use cached input methods to get data from the system data object (since this is the first time it will be cached). Again only access public methods of the system data object.
18181818
10. Use cached methods for internal and output methods(see [system caching](#caching) ). Cache keys for items should be the same as the method name.
@@ -2514,7 +2514,7 @@ from systems.forecasting import TradingRule
25142514

25152515
system=futures_system()
25162516

2517-
## Parse the existing rules in the config (not required if you're going to backtest first as this will call this method doing it's normal business)
2517+
## Parse the existing rules in the config (not required if you're going to backtest first as this will call this method doing its normal business)
25182518
system.rules.trading_rules()
25192519

25202520

@@ -3142,7 +3142,7 @@ Weighting for trading rules p&l is a *little* complicated.
31423142

31433143
*`pandl_for_trading_rule`:* If I want the performance of a given trading rule across individual instruments in isolation, then I need to take `pandl_for_trading_rule_weighted` and normalise it so that the returns are as a proportion of the sum of all the relevant forecast weight * FDM * instrument weight * IDM; this is equivalent to the rules risk contribution within the system. . This is an unweighted curve in one sense (it's not a proportion of total capital), but it's weighted in another (the indiviaul curves when added up give the group curve). The total account curve will have the same target risk as the entire system. The individual curves within it are for each instrument, weighted by their contribution to risk.
31443144

3145-
*`pandl_for_all_trading_rules_unweighted`:* If I group *these* curves together, then I get `pandl_for_all_trading_rules_unweighted`. The individual curves will be individual trading rules but not weighted; so each will have it's own risk target. This is an unweighted group in the truest sense; the total curve won't make sense.
3145+
*`pandl_for_all_trading_rules_unweighted`:* If I group *these* curves together, then I get `pandl_for_all_trading_rules_unweighted`. The individual curves will be individual trading rules but not weighted; so each will have its own risk target. This is an unweighted group in the truest sense; the total curve won't make sense.
31463146

31473147

31483148
To summarise:
@@ -3249,16 +3249,16 @@ As you can see the log is also currently used for very basic error handling.
32493249

32503250
### Advanced logging
32513251

3252-
In my experience wading through long log files is a rather time consuming experience. On the other hand it's ofen more useful to use a logging approach to monitor system behaviour than to try and create quantitative diagnostics. For this reason I'm a big fan of logging with *attributes*. Every time a log method is called, it will typically know one or more of the following:
3252+
In my experience wading through long log files is a rather time consuming experience. On the other hand it's often more useful to use a logging approach to monitor system behaviour than to try and create quantitative diagnostics. For this reason I'm a big fan of logging with *attributes*. Every time a log method is called, it will typically know one or more of the following:
32533253

3254-
- which 'type' of process owns the logger. For example if it's part of a base_system object, it's type will be 'base_system'. Future types will probably include price collection, execution and so on.
3254+
- which 'type' of process owns the logger. For example if it's part of a base_system object, its type will be 'base_system'. Future types will probably include price collection, execution and so on.
32553255
- which 'stage' or sub process is involved, such as 'rawdata'.
32563256
- which instrument code is involved
32573257
- which trading rule variation is involved
32583258
- which specific futures contract we're looking at (for the future)
32593259
- which order id (for the future)
32603260

3261-
Then we'll be able to save the log message with it's attributes in a database (in future). We can then query the database to get, for example, all the log activity relating to a particular instrument code or trade, for particular dates.
3261+
Then we'll be able to save the log message with its attributes in a database (in future). We can then query the database to get, for example, all the log activity relating to a particular instrument code or trade, for particular dates.
32623262

32633263
You do need to keep track of what attributes your logger has. Generally speaking you should use this kind of pattern to write a log item
32643264

sysdata/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def keys(self):
109109

110110
def get_value_of_block_price_move(self, instrument_code):
111111
"""
112-
How much does a $1 (or whatever) move in the price of an instrument block affect it's value?
112+
How much does a $1 (or whatever) move in the price of an instrument block affect its value?
113113
eg 100.0 for 100 shares
114114
115115
:param instrument_code: instrument to value for

systems/account.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@ def _pandl_for_instrument(
10991099

11001100
def pandl_for_trading_rule(self, rule_variation_name, delayfill=True):
11011101
"""
1102-
Get the p&l for one trading rule over multiple instruments; as % of it's risk contribution
1102+
Get the p&l for one trading rule over multiple instruments; as % of its risk contribution
11031103
11041104
Within the trading rule the instrument returns are weighted by instrument weight
11051105

systems/basesystem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ def calc_or_cache_nested(self, itemname, instrument_code, keyname, func, this_st
659659
If itemname[instrument_code][keyname] exists return it.
660660
Else call func with arguments: self, instrument_code, keyname, *args
661661
and **kwargs if we have to call the func updates the dictionary with
662-
it's value
662+
its value
663663
664664
Used for cache within various kinds of objects like config, price,
665665
data, system...

0 commit comments

Comments
 (0)