RoboZonky / natural-strategy-setup

Webový konfigurátor investiční strategie pro RoboZonky
https://robozonky.github.io/konfigurace-strategie/
2 stars 1 forks source link

5.7.0 overhauls investment strategy #70

Closed triceo closed 4 years ago

triceo commented 4 years ago

Zonky has a new secondary marketplace, which allows to sell problematic loans with a discount, and to purchase these loans from other investors. This unfortunately required strategy format changes in several places.

These changes are described here (in Czech): https://github.com/RoboZonky/robozonky/wiki/RoboZonky-5.7.0:-Zm%C4%9Bny-ve-strategii

Feel free to edit if you find inconsistencies. For a specific list of changes, I suggest checking strategy source code.

As far as timing is concerned, we are in no hurry. I will probably release a beta soon. Final will be released whenever the web tool has been updated to match.

jhrcek commented 4 years ago

Ok, I'll start working on the update over the next few days.

jhrcek commented 4 years ago

@triceo I'd like your opinion / preferences regarding the biggest change: splitting of "Výše investice", that was formerly shared by both marketplaces into "Výše investice" (primary) / "Výše nákupu" (secondary). Please either ack or suggest alternative for each point.

  1. "Výše investice" will no longer use range sliders, but single value sliders.
  2. It will start at 200 Kč and allow steps of 200 Kč up to maximum of 20 000 Kč.
  3. When the value 5000 Kč is exceeded, warning will be shown similar to current behavior.
  4. "Výše nákupu" - will be added in new separate accordion section, below "Výše investice".
  5. It will also have single value sliders like. What steps size should it use (10/50/100? Using too small value might make it harder to "hit" desired value)?
  6. What should be the minimal allowed value on the slider? I'm asking about minimal value of X in the interval (1,X), where 1 is hardcoded in the robot as I understand.
  7. What should this section show when "Ignorovat všechny participace" is checked in "Pravidla nákupu"? a) all sliders, regardles of "Ignorovat všechny participace" setting OR b) instead of sliders just a message like "Chcete li nakupovat participace na sekundárním tržišti, odškrtněte volbu 'ignorovat všechny participace' v sekci pravidla nákupu".
  8. 7.b made me think that similar behavior (hiding the sliders) might be desirable for "Výše investice" too when "Ignorovat všechny půjčky". Should I retrospectively add this behavior too? Example: it doesn't make much sense to have both of the following in the strategy: "Robot má investovat do úvěrů po 1000 Kč" and "Ignorovat všechny půjčky."
  9. How to migrate legacy ranges to new single values? Say user has range 2000 - 4000 as default investment. I would set both new single-value sliders to 4000 + show warning that ranges are no longer supported. Ok?
triceo commented 4 years ago

Good questions! This took some thinking.

  1. Yes.
  2. Yes.
  3. Yes.
  4. Yes.
  5. Let's keep it to 200,-.
  6. For primary marketplace, I think it needs to be 200. (0 is represented by the line missing.) For secondary marketplace, it should be 1, as that indeed is hardcoded.
  7. b)
  8. Yes.
  9. For primary marketplace, "až 200" means 200. There is nothing less than 200. So the conversion is to the nearest amount divisible by 200, I think. For the secondary marketplace, nothing changes as any number X implicitly means <1, X>.
jhrcek commented 4 years ago

Thanks, you answered most of my questions except you may have misunderstood two of them:

6. I understand that minimum of 1 for secondary marketplace is hardcoded in the robot. The tool should only allow setting upper bound of the interval X. I was asking about minimum settable value of this upper bound X. Given that we agreed on 200 as step size, I can easily allow either {0,200,400,...} or {200,400,600,...} But if you want me to allow values like {1,200,400...}, that would require small hack. The hardcoded 1 should probably not be mentioned anywhere in the tool (to remain consistent with "Robot má nakupovat participace nejvýše za X" which also doesn't mention the hardcoded 1) 9. So far the tool allowed setting ranges (X to Y) where both X and Y could only come from {0, 200, 400 ..} So if user has range 2000 - 4000 in the legacy strategy, should I completely discard 2000 and go for 4000 as single value for both primary and secondary marketplace?

triceo commented 4 years ago

Ah.

Wrt. 6 - if you want to hide the 1, I'm fine with that. (The reason for why the 1 is even there is Zonky - sometimes, you get 0.01 Kč participations on the marketplace, and I simply want the robot to ignore those.) So, whether the slider starts with 0 or 200, that's hard to decide. The phrase "Investovat po 0 Kč." makes no sense, so I guess we have to start with 200.

Wrt. 9 - yeah, I think 2000-4000 should simply become 4000. Possibly with a notification.

jhrcek commented 4 years ago

@triceo I'm almost done with the implementation, but have one question and 2 issues that are blocking further progress:

  1. Issue: parser doesn't accept "- Výše investice" NOT followed by "- Výše nákupu"

Example strategy that fails to parse: https://gist.github.com/jhrcek/244775e4045cfadcbe3440df0cad0c85

I removed the legacy expressions locally and made "Výše nákupu" optional to work around this

Can you please modify the parser so it works?

  1. Issue: parser fails to parse health condition. By reverse engineering parser I understood that condition like this should be parseable: "nikdy nebyla, nyní je nebo nyní není po splatnosti"

Sample strategy that fails to parse because of that: https://gist.github.com/jhrcek/0123c84a54836edc6df9736db4db991d

Can you please check if you can parse (e.g. add that to some of your testing strategies)?

  1. Question: Is "Zdraví" a good name for the new health condition in conditions dropdown when adding conditions?
triceo commented 4 years ago

I'll check on 1 and 2, thanks for reporting. As to 3, I think it could also be "HIstorie splácení" or something like that. But if we're going with "Zdraví", at least I think it should say "Zdraví půjčky" - otherwise it could be confused with the actual health of the client.

triceo commented 4 years ago

I have fixed the two problems mentioned. I have also unified some terminology in the strategy. Please see latest updates.

When you're done with the tool, let me know - I'll release Beta 2, so that people can test both the robot and the tool together.

And of course, let me know if there's any other parser issues. Your strategy generator is a miracle. :-)

jhrcek commented 4 years ago

Awesome, thank you! I'll finish it today or tomorrow at the latest and let you know.

jhrcek commented 4 years ago

@triceo it's ready for testing on https://janhrcek.cz/natural-strategy-setup/ Please test and let me know if you find any issue. I'll open PR for RoboZonky after addressing problems you find (should there be any).

Here's bunch of pictures describing all the visible changes: 1. 1

2. 2

3. 3

4. 4

5. 5

6. 6

7. 7

triceo commented 4 years ago

@jhrcek I'll be releasing Beta 2 tomorrow, and I'll announce the testing version of this tool as well. Let's see what people find, if anything.

jhrcek commented 4 years ago

@triceo so should I do PR to robozonky.github.io? It would be awkward if people had to change the base URL / copy just the hash part to restore their strategies.. I'll just open the PR and let you decide how to release it.

triceo commented 4 years ago

Thanks. I won'ŧ be merging just yet, I want existing users to be able to use the existing tool. It's a beta, a little inconvenience is expected, I think - the current URL will be fine.

jhrcek commented 4 years ago

Closing this as the PR https://github.com/RoboZonky/robozonky.github.io/pull/19 was merged