Backtest self-categorization (#7683)
Python Virtual Environments / build (push) Has been cancelled
API Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled

* Implement backtest self-naming and self-tagging

* Minor unit test fix

* Minor api changes

* Minor changes

* Send packet messages when algorithm's name or tags are updated

* Minor fixes

* Address peer review

* Backtest name and tags API calls

Plus, first version of CI for API tests

* Add endpoint to update a backtest set of tags

* Minor GH actions change

* Address peer review

* Add algorithm naming and tagging unit tests

* Minor backtest API changes
This commit is contained in:
Jhonathan Abreu
2024-01-30 13:59:08 -04:00
committed by GitHub
parent 6f29130221
commit d4ba8ccead
23 changed files with 1113 additions and 76 deletions
@@ -264,6 +264,53 @@ namespace QuantConnect.AlgorithmFactory.Python.Wrappers
}
}
/// <summary>
/// A list of tags associated with the algorithm or the backtest, useful for categorization
/// </summary>
public HashSet<string> Tags
{
get
{
return _baseAlgorithm.Tags;
}
set
{
_baseAlgorithm.Tags = value;
}
}
/// <summary>
/// Event fired algorithm's name is changed
/// </summary>
public event AlgorithmEvent<string> NameUpdated
{
add
{
_baseAlgorithm.NameUpdated += value;
}
remove
{
_baseAlgorithm.NameUpdated -= value;
}
}
/// <summary>
/// Event fired when the tag collection is updated
/// </summary>
public event AlgorithmEvent<HashSet<string>> TagsUpdated
{
add
{
_baseAlgorithm.TagsUpdated += value;
}
remove
{
_baseAlgorithm.TagsUpdated -= value;
}
}
/// <summary>
/// Notification manager for storing and processing live event messages
/// </summary>
@@ -1137,5 +1184,32 @@ namespace QuantConnect.AlgorithmFactory.Python.Wrappers
/// <param name="symbol">The symbol to get the ticker for</param>
/// <returns>The mapped ticker for a symbol</returns>
public string Ticker(Symbol symbol) => _baseAlgorithm.Ticker(symbol);
/// <summary>
/// Sets name to the currently running backtest
/// </summary>
/// <param name="name">The name for the backtest</param>
public void SetName(string name)
{
_baseAlgorithm.SetName(name);
}
/// <summary>
/// Adds a tag to the algorithm
/// </summary>
/// <param name="tag">The tag to add</param>
public void AddTag(string tag)
{
_baseAlgorithm.AddTag(tag);
}
/// <summary>
/// Sets the tags for the algorithm
/// </summary>
/// <param name="tags">The tags</param>
public void SetTags(HashSet<string> tags)
{
_baseAlgorithm.SetTags(tags);
}
}
}