I am at the moment writing a program focusing on asset allocation and I am thinking about how I should represent my constraints in the data model.
The first approach that came to mind was to define some categories to classify the constraints so that they could be stored in a table according to their "category" (for example, unary constraints x>=y, binary constraints y
I then came up with another idea which is to define my own "constraint language" with its own grammar and to store it as a string in the database (like Sum("Equities")<Percent(20,Portfolio)). This would imply writing a parser. I could also opt to use an XML representation of the constraints to use one of the many XML parsers.
I wanted to know if anyone had another potential solution and if you knew about some papers discussing this subject?